#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #pragma warning(disable:4146) #define FOR(k,a,b) for(uint k(a); k < (b); ++k) #define REP(k,a) for(int k=0; k < (a); ++k) #define ABS(a) ((a)>0?(a):-(a)) using namespace std; typedef long long LL; typedef unsigned int uint; typedef pair PII; typedef vector VI; typedef vector VD; typedef vector VVI; typedef vector VVD; typedef vector > VVB; int main(int argc, char** argv) { #ifdef HOME freopen("in.txt", "rb", stdin); freopen("out.txt", "wb", stdout); #endif int T,P,N; scanf("%d", &T); assert(T > 0 && T < 21); REP(tc, T) { scanf("%d %d", &N,&P); assert(N > 0 && N <= 100000); assert(P > 0 && P <= 100000); if(P < 3) { printf("impossible\n"); continue; } string s(P, 'a'); s[P / 2] = s[(P - 1) / 2] = 'b'; REP(i, N / P) printf("%s", s.c_str()); printf("\n"); } return 0; }