with open("read.txt","r") as r:
for j in range(n):
s=r.readline()
s=s.replace('\n','')
for i in range(len(s)):
if(i==0):
print(s[i].upper(),end="")
out+=s[i].upper()
elif(s[i-1]==' '):
print(s[i].upper(),end="")
out+=s[i].upper()
else:
print(s[i],end="")
out+=s[i]
out+='\n'
print()
with open("write.txt","w") as w:
w.write(out)