Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t = int(input())
- for k in range(t):
- n = int(input())
- s = input()
- if n == 2:
- ptint(s)
- continue
- if n == 3:
- print(s)
- continue
- hlp = s.replace('a', 'V').replace('e', 'V').replace('b', 'C').replace('c', 'C').replace('d', 'C')
- i = 0
- #print("hlp", hlp)
- ans = ''
- while True:
- #print("i ", i)
- if i == n - 3:
- #print("A")
- ans += s[n - 3: n]
- break
- elif i == n - 2:
- #print("B")
- ans += s[n - 2: n]
- break
- elif hlp[i + 3] == 'C':
- #print("i ", i)
- ans += s[i] + s[i + 1] + s[i + 2] + '.'
- i += 3
- elif hlp[i + 3] == 'V':
- ans += s[i] + s[i + 1] + '.'
- i += 2
- print(ans)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement