#C13471. String Transformation Challenge

    ID: 43013 Type: Default 1000ms 256MiB

String Transformation Challenge

String Transformation Challenge

You are given a string consisting only of the characters 'a', 'b', and 'c'. Your task is to transform the string by applying the following substitution rules:

ab,bc,caa \to b, \quad b \to c, \quad c \to a

The input will be read from standard input (stdin) and the transformed string should be printed to standard output (stdout). Make sure to handle the case of an empty string correctly.

inputFormat

The input consists of a single line containing a string composed exclusively of the characters 'a', 'b', and 'c'. The string may be empty.

outputFormat

Output the transformed string after replacing every 'a' with 'b', every 'b' with 'c', and every 'c' with 'a'.## sample

a
b