在给定的文本中找到所有以大写字母开头的单词，并将它们替换为它们的首字母缩写。
文本: Barack Obama is an American politician and attorney who served as the 44th President of the United States from 2009 to 2017.
B.O. is an A.P. and attorney who served as the 44th P.O.T.U.S. from 2009 to 2017.