#R1021. [KBC002E] Sequence 5

[KBC002E] Sequence 5

Problem Description

There is an operation ff defined as follows:

  • For individual characters, f(A)=T,f(T)=A,f(C)=G,f(G)=Cf(A)=T, f(T)=A, f(C)=G, f(G)=C.
  • For a string ss and 1ijn1\le i\le j\le n, we have f(i,j)=f(sj)f(sj1)f(si)f(i,j)=f(s_j)f(s_{j-1})\dots f(s_i), which means f(i,j)f(i,j) represents the string obtained by replacing the characters sis_i to sjs_j in ss with f(si),f(si+1),,f(sj)f(s_i), f(s_{i+1}), \dots, f(s_j).

Given a string ss, find the lexicographically smallest string obtained by applying the operation f(i,j)f(i,j) for all 1ijn1\le i\le j\le n to ss.

Constraints

  • s105|s|\le10^5
  • ss consists of characters A, C, G, T.

Input

The input is given in the following format from the standard input:

$\color{#cccccc}\boxed{\color{white}{\large{|}}\color{black}s\color{white}{\large{|}}}$

Output

Output the lexicographically smallest string obtained after applying the operations.

Sample Input

ACGTACGT

Sample Output

AACGACGT