/*话说之前读题都没读懂。。。Each substring of A with length equal to or larger than 4 can appear in the string exactly once.A的每个长度大于等于4的子串出现在传中恰好一次。(即:大于等于4的子串不能重复出现)跟大神学的一种方法。。。首先,长度为4的字符串有26^4种,故可猜测满足题意的最大长度的字符串的长度是26^4+3 (+3是因为鸽巢原理)。此题关键就在于如何构造满足题意的字符串(废话啊。。。)用数组used[][][][],来判断长度为4的字符串是否出现重复。即:在每次增加一个字符(位置为pos),选择字母是时,判断used[str[pos-3]][str[pos-2]][str[pos-1]][str[pos]],是否为true,若真,说明此子串之前有用过,无法选择该字母,否则,可选。复杂度:所能构造的最长字符串*26 <= (500000*26),可AC。。。注意:要先把 aaaa,bbbb,...,zzzz放到字符串中,否则它们无法被构造出来。*/
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cstring>
using namespace std;
const int MAX = 500005;
int N, len;
int str[MAX];
bool used[26][26][26][26];
int main()
{
//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);
memset(used, false, sizeof(used));
len = 0;
for (int i = 0; i < 26; ++i) {
for (int j = 0; j < 4; ++j) {
str[len++] = i;
}
}
for (int i = 0; i < (len - 3); ++i) {
used[str[i]][str[i + 1]][str[i + 2]][str[i + 3]] = true;
}
bool Judge = true;
while (Judge) {
Judge = false;
for (int i = 0; i < 26; ++i) {
if (!used[str[len - 3]][str[len - 2]][str[len - 1]][i]) {
str[len] = i;
used[str[len - 3]][str[len - 2]][str[len - 1]][i] = true;
len++;
Judge = true;
}
}
}
while (~scanf("%d", &N)) {
if (N > len) {
printf("Impossible\n");
}
else {
for (int k = 0; k < N; ++k) {
printf("%c", 'a' + str[k]);
}
printf("\n");
}
}
return 0;
}