Watch President Donald Trump give the Coast Guard commencement address on Wednesday.

NEW LONDON, Conn. — President Donald Trump lashed out Wednesday at his “critics and naysayers” following more than a week of negative news coverage beginning with his sudden decision to fire James Comey as FBI director.

In an address to the newest group of U.S. Coast Guard officers, Trump urged the 195 graduates in the Class of 2017 to “put your head down and fight, fight, fight” when life presents them with challenges and adversity.

Trump’s appearance at the academy came the day after reports that he had personally appealed to Comey to abandon the FBI’s investigation into former National Security Adviser Michael Flynn. Trump fired Flynn earlier this year for misleading top White House officials about his contacts with Russian officials.

The White House has denied the latest report, which landed amid a furor over the president’s recent Oval Office meeting with Russian diplomats in which Trump is said to have disclosed classified information. The White House has said it was “wholly appropriate” for Trump to share the information.

“Look at the way I’ve been treated lately, especially by the media,” Trump said. “No politician in history, and I say this with great surety, has been treated worse or more unfairly. You can’t let them get you down. You can’t let the critics and the naysayers get in the way of your dreams.”

“I guess that’s why we won,” he said, before continuing to offer the graduates his advice.

“Adversity makes you stronger. Don’t give in, don’t back down and never stop doing what you know is right,” Trump said. “Nothing worth doing ever, ever, ever came easy and the more righteous your fight, the more opposition that you will face.”

Trump also praised the newly minted Coast Guard officers, emphasizing that they will be an asset to his efforts to protect the homeland, protect U.S. harbors and seas from drug smuggling and human trafficking and keep out “all who seek to do harm to our country.

But his own political troubles were not far from his mind.

“Things are not always fair,” Trump said, adding that sometimes “things happen to you that you do not always deserve.”

READ MORE: Trump urges Liberty University grads to stand up to criticism