#include <bits/stdc++.h>
using namespace std;
vector <string> getMazePaths(int source_row, int source_column, int destination_row, int destination_column) {
     if(source_row > destination_row || source_column > destination_column){
        vector <string> base_result;
        return base_result;
    }

    if(source_row == destination_row && source_column == destination_column){
        vector <string> base_result;
        base_result.push_back("");
        return base_result;
    }

vector <string> horizontal_path = getMazePaths(source_row, source_column + 1, destination_row, destination_column);
vector <string> vertical_path = getMazePaths(source_row + 1, source_column, destination_row, destination_column);
vector <string> paths;

    for (string hpath: horizontal_path){
        paths.push_back('h' + hpath);
    }

    for (string vpath: vertical_path){
        paths.push_back('v' + vpath);
    }
    return paths;
}

int main() 
{
    int n,m;
    cin>>n>>m;
    vector <string> paths = getMazePaths(0, 0, n - 1, m - 1);
    int count = 0;
    cout<<"[";
    for (string str : paths)
    {
        /* code */
        if(count != paths.size() - 1)
        cout<<str<<", ";
        else 
        cout<<str;
        count++;
    }
    cout<<"]";
    return 0;        
}