#include "testlib.h"

int main(int argc, char** argv) {
    registerGen(argc, argv, 1);
    
    std::cout << 1 << std::endl;

    int n = atoi(argv[1]);
    int m = atoi(argv[2]);
    int cnt = atoi(argv[3]);

    std::cout << n << ' ' << m << std::endl;

    std::vector<std::string> a(n);
    for (int i = 0; i < n; ++i) {
        a[i].resize(m, '.');
    }

    for (int i = 0; i < cnt; ++i) {
        int x = rnd.next(0, n - 1);
        int y = rnd.next(0, m - 1);
        a[x][y] = '#';
    }

    int sx = -1, sy = -1;
    int tx = -1, ty = -1;
    do {
        sx = rnd.next(0, n - 1);
        sy = rnd.next(0, m - 1);
    } while (a[sx][sy] != '.');
    a[sx][sy] = 's';

    do {
        tx = rnd.next(0, n - 1);
        ty = rnd.next(0, m - 1);
    } while (a[tx][ty] != '.');
    a[tx][ty] = 'f';

    for (int i = 0; i < n; ++i) {
        std::cout << a[i] << std::endl;
    }

    return 0;
}