시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 1790 774 656 45.024%

문제

문장이 주어졌을 때, 단어를 모두 뒤집어서 출력하는 프로그램을 작성하시오. 단, 단어의 순서는 바꿀 수 없다. 단어는 영어 알파벳으로만 이루어져 있다.

입력

첫째 줄에 테스트 케이스의 개수 T가 주어진다. 각 테스트 케이스는 한 줄로 이루어져 있으며, 문장이 하나 주어진다. 단어의 길이는 최대 20, 문장의 길이는 최대 1000이다. 단어와 단어 사이에는 공백이 하나 있다.

출력

각 테스트 케이스에 대해서, 입력으로 주어진 문장의 단어를 모두 뒤집어 출력한다.

예제 입력 1

2
I am happy today
We want to win the first prize

예제 출력 1

I ma yppah yadot
eW tnaw ot niw eht tsrif ezirp
W3sicHJvYmxlbV9pZCI6IjkwOTMiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWIyZThcdWM1YjQgXHViNGE0XHVjOWQxXHVhZTMwIiwiZGVzY3JpcHRpb24iOiI8cD5cdWJiMzhcdWM3YTVcdWM3NzQgXHVjOGZjXHVjNWI0XHVjODRjXHVjNzQ0IFx1YjU0YywgXHViMmU4XHVjNWI0XHViOTdjIFx1YmFhOFx1YjQ1MCBcdWI0YTRcdWM5ZDFcdWM1YjRcdWMxMWMgXHVjZDljXHViODI1XHVkNTU4XHViMjk0IFx1ZDUwNFx1Yjg1Y1x1YWRmOFx1YjdhOFx1Yzc0NCBcdWM3OTFcdWMxMzFcdWQ1NThcdWMyZGNcdWM2MjQuIFx1YjJlOCwgXHViMmU4XHVjNWI0XHVjNzU4IFx1YzIxY1x1YzExY1x1YjI5NCBcdWJjMTRcdWFmYzAgXHVjMjE4IFx1YzVjNlx1YjJlNC4gXHViMmU4XHVjNWI0XHViMjk0IFx1YzYwMVx1YzViNCBcdWM1NGNcdWQzMGNcdWJjYjNcdWM3M2NcdWI4NWNcdWI5Y2MgXHVjNzc0XHViOGU4XHVjNWI0XHVjODM4IFx1Yzc4OFx1YjJlNC48X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