import sys
input = sys.stdin.readline
s = input().rstrip() + '.'
answer=''
cnt=0
for chr in s:
if chr=='X':
cnt+=1
if cnt==4:
answer+='AAAA'
cnt=0
else:
if cnt==2:
answer+='BB.'
cnt=0
elif cnt==0:
answer+='.'
else:
print(-1)
exit()
print(answer[:-1])
'practivceAlgorithm > 백준' 카테고리의 다른 글
[백준][Python] 11509 풍선맞추기 (0) | 2021.08.08 |
---|---|
[백준][Python] 15810 풍선공장 (0) | 2021.08.08 |
[백준][Python] 14891 톱니바퀴 (0) | 2021.08.07 |
[백준][Python] 1074 Z (0) | 2021.08.06 |
[백준][Python] 1316 그룹단어체커 (0) | 2021.08.06 |