#include <bits/stdc++.h>
using namespace std;

void Print_Maze_with_Jumps(int source_row, int source_column, int destination_row, int destination_column, string psf){
    if(source_row > destination_row || source_column > destination_column){
            return;
        }
    if (source_row == destination_row && source_column == destination_column)
    {
        /* code */
        cout<<psf<<endl;
        return;
    }
        for(int jumps = 1; jumps <= destination_column - source_column; jumps++){
            Print_Maze_with_Jumps(source_row, source_column + jumps, destination_row, destination_column, psf + "h" + (to_string)(jumps));
        }
        
        for(int jumps = 1; jumps <= destination_row - source_row; jumps++){
            Print_Maze_with_Jumps(source_row + jumps, source_column, destination_row, destination_column, psf + "v" + (to_string)(jumps));
        }

        for(int jumps = 1; jumps <= destination_column - source_column && jumps <= destination_row - source_row; jumps++){
            Print_Maze_with_Jumps(source_row + jumps, source_column + jumps, destination_row, destination_column, psf + "d" + (to_string)(jumps));
        }
}
int main(){
    int row, column;
    cin>>row>>column;
    Print_Maze_with_Jumps(0, 0, row - 1, column - 1, "");
    return 0;
}