import java.util.*;
import java.lang.*;
import java.io.*;

class Ideone {
	public static void main (String[] args) throws java.lang.Exception {
		short x = (short)0xABCD;
		short y = (short)Integer.parseInt(String.format("%04x", x).replaceAll("(.)(.)(..$)", "$2$1$3"), 16);
		System.out.println(String.format("%04x", y));
	}
}