#include
using namespace std;
int c = 0;
bool playerMaze(int a[1000][1000], int sol[][1000], int i, int j, int m, int n)
{
if (i == m & j == n)
{
sol[m][n] = 1;
c++;
cout<<" ";
return true;
}
if (i > m || j > n)
{
return false;
}
sol[i][j] = 1;
bool diag = playerMaze(a, sol, i + 1, j + 1, m, n);
bool left = playerMaze(a, sol, i, j + 1, m, n);
bool down = playerMaze(a, sol, i + 1, j, m, n);
sol[i][j] = 0;
if (left)
{
cout << "H";
return true;
}
if (down)
{
cout << "V";
return true;
}
if (diag)
{
cout << "D";
return true;
}
return false;
}
int main()
{
int n, m;
cin >> m >> n;
int a[1000][1000];
int sol[1000][1000] = {0};
playerMaze(a, sol, 0, 0, m, n);
cout<<endl<<c<<endl;
return 0;
}