#include "testlib.h"
#include <iostream>

using namespace std;

int main(int argc, char* argv[])
{
    registerGen(argc, argv);
    int n = atoi(argv[1]);
    cout << n << endl;

    int a[1000000];
    a[0] = rnd.next(1,9);
    a[1] = (a[0] % 2 + 2*rnd.next(0,9) + 1) % 10;
    
    cout << a[0];
    for(int i = 1; i < n; i++)
    {    int p = 2 * rnd.next(0,9);
         cout << (a[i % 2] + p) % 10;
     }   
    cout << endl;
    return 0;
}