CODE:

 

#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cstdio>
using namespace std;

char str[10] = "HDU";

int main()
{
    int n;
    int T;
    scanf("%d", &T);
    while(T--)
    {
        scanf("%d", &n);
        for(int i = 0; i < 3*n; i++)
        {
            for(int j = 0; j < n; j++)
            {
                printf("%s", str);
            }
            printf("\n");
        }
    }
    return 0;
}

 

posted on 2012-10-13 22:13  有间博客  阅读(142)  评论(0编辑  收藏  举报