#include <iostream>
using namespace std;

typedef unsigned long long UInt64;
typedef unsigned int UInt32;

class Random {
private:
    static UInt64 const a=4294967118;
    UInt64 x;
public:
    Random(UInt64 seed=0) {
        x=seed+!seed;
    }
    UInt32 operator()() {
        x=a*(x&0xffffffff)+(x>>32);
        return x;
    }
};

int main(){
	for(int s=0;s<20;++s){
		Random rand(s);
		for(int i=0;i<20;++i)
			cout<<rand()%10<<' ';
		cout<<'\n';
	}
}
