#include <iostream>

using namespace std;
int main(int argc, char** argv)
{
    int w, h;
    string field[100];

    for (;;) {
        cin >> w >> h;
        if ((w == 0) && (h == 0)) {
            break;
        }
    }
    return 0;
}