"Meeting steamers, do not dread
When you see three lights ahead
Starboard wheel and show your red.
Green to green or red to red
Perfect safety, go ahead.
If to starboard red appear,
'Tis your duty to keep clear.
Act as judgement says is proper
Port or starboard, back or stop her.
When upon your port is seen
A steamer's starboard light of green
There's not so much for you to do
For green to port keeps clear of you.
Both in danger and in doubt
Always keep a good look out.
In danger with no room to turn
Ease her, stop her, go astern."

Thomas Gray, Secretary to the Board of Trade, 1862

He did not, however, write this one:

"When in danger or in doubt
Wave and shout and rush about!"

Or this one:

"Here lies the body of Johnny O'Day
Who died preserving his Right of Way.
He was right, dead right, as he sailed along,
But he's just as dead as if he'd been wrong!