On May 25, 1861, Abraham Lincoln sat down to write a New York oyster salesman and his wife what was probably his first condolence letter of the Civil War.
"My dear Sir and Madam," he began, "in the untimely loss of your noble son, our affliction here, is scarcely less than your own."
The president had known the late Col. Elmer E. Ellsworth before the war, and found in him, "a fine intellect, an indomitable energy. . .And yet he was singularly modest and deferential in social intercourse."
The day before Ellsworth, 24, had been shot and killed in Alexandria, Va., by a Confederate sympathiser as he pulled down a rebel flag flying from the roof of a hotel across the Potomac River from Washington.
It was one of the early deaths of the Civil War, then only a few weeks old, in a conflict that would claim tens of thousands of lives during the next four years.
And Lincoln's letter to Ellsworth's parents, Ephraim and Phoebe, is one of the most moving in American history: "In the hope that it may be no intrusion upon the sacredness of your sorrow, I have ventured to address you this tribute to the memory of my young friend, and your brave and early fallen child. . ."
Amid the furore over President Donald Trump's call to the mother of a fallen soldier, it is worth noting that few commander-in-chiefs handled the wrenching job better than Lincoln.
A century later, President Lyndon B. Johnson struggled with a letter to the stricken parents of Marine Cpl. Russell Forrest "Rusty" Keck, 20, who had been killed in Vietnam on May 18, 1967, according to the National Archives.
The Kecks had penned letters to the President expressing their anger and grief at the loss of their son, Mrs. Keck writing at one point, "You are responsible for taking his life. You could have prevented it and you can prevent more deaths. . ."
Johnson's June 14, 1967 type-written draft of his response, on White House stationary, is heavily edited in pencil, with entire paragraphs crossed out and replaced with hand-written corrections.
"Dear Mr. and Mrs. Keck," he began, "As you know, we have been going through a severe crisis in the Middle East. . ."
That was crossed out and replaced with, "I am deeply sorry that I have not replied to your letter before now. . ."
The letter had stated, "But your president has other responsibilities. . ."
That was crossed out in pencil and replaced with, "If it were possible to end the war by an honorable settlement in Vietnam today and to bring home every man who faces danger there now, I would do it. And it would be the most satisfying act of my Presidency."
During World War II, President Franklin D. Roosevelt sent the family of Lt. Louis S. Zamperini, the Army aviator who was thought to be dead in Central Pacific Ocean, a signed proclamation that appeared to be a form letter: "He stands in the unbroken line of patriots who have dared to die that freedom might live. . .He lives in a way that humbles the undertakings of most men."
(Zamperini, who'd been an Olympic distance runner, turned out to be alive, a prisoner of war in Japan. He came home a hero, and was later the subject of books and movie. He died in 2014.)
Lincoln had a more personal approach, though he may not have written the condolence letter he's most famous for. It was an eloquent note to Lydia Bixby, a Massachusetts widow believed to have lost five sons during the Civil War.
"I have been shown in the files of the War Department a statement of the Adjutant General of Massachusetts that you are the mother of five sons who have died gloriously on the field of battle.
"I feel how weak and fruitless must be any word of mine which should attempt to beguile you from the grief of a loss so overwhelming. But I cannot refrain from tendering you the consolation that may be found in the thanks of the Republic they died to save.
"I pray that our Heavenly Father may assuage the anguish of your bereavement, and leave you only the cherished memory of the loved and lost, and the solemn pride that must be yours to have laid so costly a sacrifice upon the altar of freedom."
It was signed: "Yours, very sincerely and respectfully, A. Lincoln"
Some historians believe the letter was actually written by Lincoln's White House secretary, John Hay, a future secretary of state.
But there's no doubt about the letter the president wrote in December 1862 to Fanny McCullough, whose father, William, had been killed in battle. The president was still grieving for his 11-year-old son, Willie, who died in the White House ten months earlier.
"In this sad world of ours, sorrow comes to all," Lincoln wrote. "And to the young it comes with bitterest agony. . .You can not now realize that you will ever feel better. Is this not so? And yet it is a mistake. You are sure to be happy again. . .I have had experience enough to know what I say."