#include <stdio.h>

int main() {
    char player;
    scanf("%c", &player);

    switch (player) {
        case 'a':
            printf("z\n");
            break;
        case 'b':
            printf("x\n");
            break;
        case 'c':
            printf("y\n");
            break;
        case 'x':
            printf("b\n");
            break;
        case 'y':
            printf("c\n");
            break;
        case 'z':
            printf("a\n");
            break;
        default:
            printf("Invalid input\n");
    }

    return 0;
}
