public class Solution {
    public static void main(String[] args) {
        //String path1 = "c:\\src.txt";
        // String path2 = "c:\\out.txt";
        Scanner scanner = new Scanner(System.in);
        Path path1 = Paths.get(scanner.nextLine());
        Path path2 = Paths.get(scanner.nextLine());

        try (InputStream input = Files.newInputStream(path1)
             ; OutputStream output = Files.newOutputStream(path2)) {
            byte[] buffer = new byte[1024];
            byte[] trimmed;
            int real;
            while ((real = input.read(buffer)) != -1) {

                trimmed = Arrays.copyOf(buffer, real);

                output.write(revers(trimmed), 0, real);

            }

        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    static byte[] revers(byte[] rev) {
        for (int i = 0; i < rev.length; i += 2) {
            if (i + 1 < rev.length) {
                byte tmp = rev[i];
                rev[i] = rev[i + 1];
                rev[i + 1] = tmp;
            } else return rev;


        }
        return rev;
    }
}