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

public class SRSGen {
    private static final long INITIAL_GAMMA = 0x9e3779b97f4a7c15L;
    static long seed = 1234567;
    static long gamma = INITIAL_GAMMA;
    private static long mix64(long z) {
        z = (z ^ (z >>> 33)) * 0xff51afd7ed558ccdL;
        z = (z ^ (z >>> 33)) * 0xc4ceb9fe1a85ec53L;
        return z ^ (z >>> 33);
    }

    /**
     * Computes int value of half of MurmurHash3 64bit mix function.
     */
    private static int mix32(long z) {
        return (int) (((z ^ (z >>> 33)) * 0xc4ceb9fe1a85ec53L) >>> 32);
    }

    /**
     * Computes Stafford's "Mix13" variant of mix64.
     */
    private static long mix64s(long z) {
        z = (z ^ (z >>> 30)) * 0xbf58476d1ce4e5b9L;
        z = (z ^ (z >>> 27)) * 0x94d049bb133111ebL;
        return z ^ (z >>> 31);
    }

    /**
     * Adds gamma to seed.
     */
    private static long nextSeed() {
        return seed += gamma;
    }

    /**
     * Returns the gamma value to use for a new split instance.
     */
    private static long nextGamma(long s) {
       long g = mix64s(s) | 1L;
       int n = Long.bitCount(g);
       if (n < 12 || n > 52)  // ensure enough 0 and 1 bits
           g ^= 0xaaaaaaaaaaaaaaaaL;
       return g;
    }

    public static int nextInt() {
        return mix32(nextSeed());
        //        return (int)(mix64(nextSeed()) >>> 32);
    }

    
    public static void main(String[] args) throws Exception {
        for (;;) {
            int x = nextInt();
            System.out.write(x & 0xFF);
            System.out.write((x >>>= 8) & 0xFF);
            System.out.write((x >>>= 8) & 0xFF);
            System.out.write((x >>>= 8) & 0xFF);
            gamma = nextGamma(nextSeed());
        }
    }

}            