#include <bits/stdc++.h>
using namespace std;
const int tmax=1e5+5;
const long double epx=1e-30,one=1.0;
int n,num1,num2,index1,index2;
long double ans=-1;
/*
int cmp(long double a,long double b)
{
	if(a-b>epx) return 1;
	if(b-a>epx) return -1;
	return 0;
}*/
int cmp(long double a,long double b)
{
	if(fabs(a-b)<=epx) return 0;
	if(a-b>epx) return  1;
	return -1;
}
struct node{
	long double cos,sin;
	int ori;
	bool operator <(node b)const
	{
		return (cmp(cos,b.cos)==-1);
	}
};
node pos[tmax],neg[tmax];
int main()
{
	int i;
	long long x,y;
	long double r,tmp;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%I64d%I64d",&x,&y);
		r=sqrt(one*x*x+one*y*y);
		if(y>=0)
		{
			num1++;
			pos[num1].cos=(one*x)/r;
			pos[num1].sin=(one*y)/r;
			pos[num1].ori=i;
		}
		else
		{
			num2++;
			neg[num2].cos=(one*x)/r;
			neg[num2].sin=(one*y)/r;
			neg[num2].ori=i;
		}
	}
	sort(pos+1,pos+1+num1);
	sort(neg+1,neg+1+num2);
	for(i=2;i<=num1;i++)
	{
		tmp=pos[i].cos*pos[i-1].cos+pos[i].sin*pos[i-1].sin;
		if(cmp(tmp,ans)>-1)
		{
			ans=tmp;
			index1=pos[i].ori;
			index2=pos[i-1].ori;
		}
	}
	for(i=2;i<=num2;i++)
	{
		tmp=neg[i].cos*neg[i-1].cos+neg[i].sin*neg[i-1].sin;
		if(cmp(tmp,ans)>-1)
		{
			ans=tmp;
			index1=neg[i].ori;
			index2=neg[i-1].ori;
		}
	}
	if(num1>=1&&num2>=1)
	{
		tmp=pos[num1].cos*neg[num2].cos+pos[num1].sin*neg[num2].sin;
		if(cmp(tmp,ans)>-1)
		{
			ans=tmp;
			index1=pos[num1].ori;
			index2=neg[num2].ori;
		}
		tmp=pos[1].cos*neg[1].cos+pos[1].sin*neg[1].sin;
		if(cmp(tmp,ans)>-1)
		{
			index1=pos[1].ori;
			index2=neg[1].ori;
		}
	}
	printf("%d %d",index1,index2);
	return 0;
}


/*
 *题号：
 *时间：
 *解题思想：
 *
 */
//include <bits/stdc++.h>
#include <functional>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cstdlib>
#include <numeric>
#include <utility>
#include <cstring>
#include <climits>
#include <limits>
#include <string>
#include <cstdio>
#include <vector>
#include <string>
#include <cctype>
#include <bitset>
#include <stack>
#include <queue>
#include <deque>
#include <cmath>
#include <list>
#include <map>
#include <set>

#define f(i, a, b) for(int i = a; i <= b; i++)
#define ms(Arr) memset(Arr,0,sizeof(Arr));
#define CLR(arr,val)  memset(arr,val,sizeof(arr))

const double eps=1e-8,pi=acos(1.0*(-1));
const int INF=0x3f3f3f3f,mod=1e9+7;
const int dx[]={0,0,1,-1},dy[]={1,-1,0,0};
typedef std::pair<int,int> P;
typedef long long LL;
typedef long long ll;
using namespace std;
ll gcd(ll a,ll b){if(a<b)swap(a,b);return b==0?a:gcd(b,a%b);}
ll lcm(ll a,ll b){if(a<b)swap(a,b);return a/gcd(a,b)*b;}
ll quickPow(ll a,ll b,ll c=mod){ll z=1;a=a%c;while(b>0){if(b&1)z=(z*a)%c;b=b>>1;a=(a*a)%c;}return z;}
int Scan(){int r=0,f=0;char c;if ((c=getchar())=='-')f=1;else if(c>='0'&&c<='9'){r=c-'0';}while((c=getchar()) >='0'&&c<='9'){r=r*10+(c-'0');}return f?-r:r;}
void Out(int a){if(a < 0){putchar('-');a = -a;}if (a >= 10){Out(a / 10);}putchar(a % 10 + '0');}

/////////////////////////////////////////////////////////////////////////
//long long 范围：-9223372036854775808 ~ 9223372036854775807
//int 范围：-2147483648 ~ 2147483647
//double 范围：-1.7*10^-308 ~ 1.7*10^308，15~16位有效数字
//long double 范围：-1.2*10^-4932 ~ 1.2*10^4932，18~19位有效数字
/////////////////////////////////////////////////////////////////////////
const int maxn = 1e5 + 5;
int n;
pair<long double, int> angle[maxn];

int main(/*int argc, char *argv[]*/) {
    cin  >> n;
    for(int i = 0; i < n; i++){
        long double x,y;
        cin >> x >> y;
        auto t = make_pair(atan2(y, x) ,i+1);
        angle[i] = t;
    }

    sort(angle, angle + n);
    int a,b;
    long long ans = 2*pi;
    for(int i= 0;i < n;i++)
    {
        long double tmp = angle[(i+1) % n].first - angle[i].first;
        if(tmp < 0) tmp += 2*pi;
        if(tmp < ans) {
            ans = tmp;
            a = angle[i].second;
            b = angle[(i+1) % n].second;
        }
    }
    cout <<a << ' '<< b<< endl;
    return 0;
}


/*
 *题号：
 *时间：
 *解题思想：
 *
 */
//include <bits/stdc++.h>
#include <functional>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cstdlib>
#include <numeric>
#include <utility>
#include <cstring>
#include <climits>
#include <limits>
#include <string>
#include <cstdio>
#include <vector>
#include <string>
#include <cctype>
#include <bitset>
#include <stack>
#include <queue>
#include <deque>
#include <cmath>
#include <list>
#include <map>
#include <set>

#define f(i, a, b) for(int i = a; i <= b; i++)
#define ms(Arr) memset(Arr,0,sizeof(Arr));
#define CLR(arr,val)  memset(arr,val,sizeof(arr))

const double eps=1e-8,pi=acos(1.0*(-1));
const int INF=0x3f3f3f3f,mod=1e9+7;
const int dx[]={0,0,1,-1},dy[]={1,-1,0,0};
typedef std::pair<int,int> P;
typedef long long LL;
typedef long long ll;
using namespace std;
ll gcd(ll a,ll b){if(a<b)swap(a,b);return b==0?a:gcd(b,a%b);}
ll lcm(ll a,ll b){if(a<b)swap(a,b);return a/gcd(a,b)*b;}
ll quickPow(ll a,ll b,ll c=mod){ll z=1;a=a%c;while(b>0){if(b&1)z=(z*a)%c;b=b>>1;a=(a*a)%c;}return z;}
int Scan(){int r=0,f=0;char c;if ((c=getchar())=='-')f=1;else if(c>='0'&&c<='9'){r=c-'0';}while((c=getchar()) >='0'&&c<='9'){r=r*10+(c-'0');}return f?-r:r;}
void Out(int a){if(a < 0){putchar('-');a = -a;}if (a >= 10){Out(a / 10);}putchar(a % 10 + '0');}

/////////////////////////////////////////////////////////////////////////
//long long 范围：-9223372036854775808 ~ 9223372036854775807
//int 范围：-2147483648 ~ 2147483647
//double 范围：-1.7*10^-308 ~ 1.7*10^308，15~16位有效数字
//long double 范围：-1.2*10^-4932 ~ 1.2*10^4932，18~19位有效数字
/////////////////////////////////////////////////////////////////////////
const int maxn = 1e5 + 5;
int n;
pair<long double, int> angle[maxn];

int main(/*int argc, char *argv[]*/) {
    cin  >> n;
    for(int i = 0; i < n; i++){
        long double x,y;
        cin >> x >> y;
        auto t = make_pair(atan2(y, x) ,i+1);
        angle[i] = t;
    }

    sort(angle, angle + n);
    int a,b;
    long long ans = 2*pi;
    for(int i= 0;i < n;i++)
    {
        long double tmp = angle[(i+1) % n].first - angle[i].first;
        if(tmp < 0) tmp += 2*pi;
        if(tmp < ans) {
            ans = tmp;
            a = angle[i].second;
            b = angle[(i+1) % n].second;
        }
    }
    cout <<a <<  b<< endl;
    return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <map>

using namespace std;

typedef long double ld;

const ld INF = 1e9, pi = 3.1415926535897;

ld sqr(ld a)
{
	return a * a;
}

struct point
{
	ld x, y;

	point(ld a = 0, ld b = 0) : x(a), y(b) {};

	ld length(point b)
	{
		return sqrt(sqr(x - b.x) + sqr(y - b.y));
	}

	point turning(ld angle)
	{
		point b;
		ld A[2][2] = { { cos(angle), sin(angle) },{ -sin(angle), cos(angle) } };
		b.x = x * A[0][0] + y * A[0][1];
		b.y = x * A[1][0] + y * A[1][1];
		return b;
	}

	point shifting(point a)
	{
		point b;
		b.x = x - a.x;
		b.y = y - a.y;

		return b;
	}

	ld scalar(point b)
	{
		return x * b.x + y * b.y;
	}

	ld angle_cos(point b)
	{
		ld cnt = scalar(b) / (length(point()) * b.length(point()));

		if (cnt < -1)
			return -1;
		else if (cnt > 1)
			return 1;

		return cnt;
	}
};

const bool operator <(const point &a, const point &b)
{
	if (a.x < b.x)
		return true;
	else if (a.x == b.x)
		return a.y < b.y;
	else
		return false;
}

istream &operator >> (istream &in, point &a)
{
	cin >> a.x >> a.y;
	return in;
}

ostream &operator << (ostream &out, point a)
{
	cout << a.x << ' ' << a.y << '\n';
	return out;
}

const point OX = point(1, 0);
map<point, int> trans;

bool compare(point a, point b)
{
	ld afirst, asecond;

	if (a.x >= 0 && a.y >= 0)
	{
		afirst = atan2l(a.y, a.x);
	}
	else if (a.x <= 0 && a.y >= 0)
	{
		afirst = atan2l(a.y, a.x);
	}
	else if (a.x <= 0 && a.y <= 0)
	{
		afirst = 2 * pi + atan2l(a.y, a.x);
	}
	else if (a.x >= 0 && a.y <= 0)
	{
		afirst = 2 * pi + atan2l(a.y, a.x);
	}

	if (b.x >= 0 && b.y >= 0)
	{
		asecond = atan2l(b.y, b.x);
	}
	else if (b.x <= 0 && b.y >= 0)
	{
		asecond = atan2l(b.y, b.x);
	}
	else if (b.x <= 0 && b.y <= 0)
	{
		asecond = 2 * pi + atan2l(b.y, b.x);
	}
	else if (b.x >= 0 && b.y <= 0)
	{
		asecond = 2 * pi + atan2l(b.y, b.x);
	}

	return afirst < asecond;
}

ld my_angle(point a, point b)
{
	ld afirst, asecond;

	if (a.x >= 0 && a.y >= 0)
	{
		afirst = atan2l(a.y, a.x);
	}
	else if (a.x <= 0 && a.y >= 0)
	{
		afirst = atan2l(a.y, a.x);
	}
	else if (a.x <= 0 && a.y <= 0)
	{
		afirst = 2 * pi + atan2l(a.y, a.x);
	}
	else if (a.x >= 0 && a.y <= 0)
	{
		afirst = 2 * pi + atan2l(a.y, a.x);
	}

	if (b.x >= 0 && b.y >= 0)
	{
		asecond = atan2l(b.y, b.x);
	}
	else if (b.x <= 0 && b.y >= 0)
	{
		asecond = atan2l(b.y, b.x);
	}
	else if (b.x <= 0 && b.y <= 0)
	{
		asecond = 2 * pi + atan2l(b.y, b.x);
	}
	else if (b.x >= 0 && b.y <= 0)
	{
		asecond = 2 * pi + atan2l(b.y, b.x);
	}

	if (asecond < afirst)
		asecond += 2 * pi;

	return asecond - afirst;
}

signed main()
{
	int n;
	cin >> n;
	vector<point> points(n);

	for (int i = 0; i < n; ++i)
	{
		cin >> points[i];
		trans[points[i]] = i + 1;
	}

	sort(points.begin(), points.end(), compare);
	pair<int, int> ans;
	ld cnt = INF;

	for (int i = 0; i < n; ++i)
	{
		if (cnt > my_angle(points[i], points[(i + 1) % n]))
		{
			cnt = my_angle(points[i], points[(i + 1) % n]);
			ans.first = trans[points[i]];
			ans.second = trans[points[(i + 1) % n]];
		}
	}

	compare(points[1], points[2]);
	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <map>

using namespace std;

typedef long double ld;

const ld INF = 1e9;

ld sqr(ld a)
{
	return a * a;
}

struct point
{
	ld x, y;

	point(ld a = 0, ld b = 0) : x(a), y(b) {};

	ld length(point b)
	{
		return sqrt(sqr(x - b.x) + sqr(y - b.y));
	}

	point turning(ld angle)
	{
		point b;
		ld A[2][2] = { { cos(angle), sin(angle) },{ -sin(angle), cos(angle) } };
		b.x = x * A[0][0] + y * A[0][1];
		b.y = x * A[1][0] + y * A[1][1];
		return b;
	}

	point shifting(point a)
	{
		point b;
		b.x = x - a.x;
		b.y = y - a.y;

		return b;
	}

	ld scalar(point b)
	{
		return x * b.x + y * b.y;
	}

	ld angle_cos(point b)
	{
		ld cnt = scalar(b) / (length(point()) * b.length(point()));

		if (cnt < -1)
			return -1;
		else if (cnt > 1)
			return 1;

		return cnt;
	}
};

const bool operator <(const point &a, const point &b)
{
	if (a.x < b.x)
		return true;
	else if (a.x == b.x)
		return a.y < b.y;
	else
		return false;
}

istream &operator >> (istream &in, point &a)
{
	cin >> a.x >> a.y;
	return in;
}

ostream &operator << (ostream &out, point a)
{
	cout << a.x << ' ' << a.y << '\n';
	return out;
}

const point OX = point(1, 0);
map<point, int> trans;

bool compare(point a, point b)
{
	int first, second;

	if (a.x >= 0 && a.y >= 0)
		first = 1;
	else if (a.x <= 0 && a.y >= 0)
		first = 2;
	else if (a.x <= 0 && a.y <= 0)
		first = 3;
	else if (a.x >= 0 && a.y <= 0)
		first = 4;

	if (b.x >= 0 && b.y >= 0)
		second = 1;
	else if (b.x <= 0 && b.y >= 0)
		second = 2;
	else if (b.x <= 0 && b.y <= 0)
		second = 3;
	else if (b.x >= 0 && b.y <= 0)
		second = 4;

	if (first != second)
		return first < second;

	if (a.x == b.x && a.y == b.y)
		return trans[a] < trans[b];

	if (acos(a.angle_cos(OX)) == acos(b.angle_cos(OX)))
		return trans[a] < trans[b];

	if (first == 1 || first == 2)
	{
		return acos(a.angle_cos(OX) < acos(b.angle_cos(OX)));
	}
	else
	{
		return acos(a.angle_cos(OX) > acos(b.angle_cos(OX)));
	}

	return 0;
}

signed main()
{
	int n;
	cin >> n;
	vector<point> points(n);

	for (int i = 0; i < n; ++i)
	{
		cin >> points[i];
		trans[points[i]] = i + 1;
	}

	sort(points.begin(), points.end(), compare);
	pair<int, int> ans;
	ld cnt = INF;

	for (int i = 0; i < n; ++i)
	{
		if (cnt > acos(points[i].angle_cos(points[(i + 1) % n])))
		{
			cnt = acos(points[i].angle_cos(points[(i + 1) % n]));
			ans.first = trans[points[i]];
			ans.second = trans[points[(i + 1) % n]];
		}
	}

	if (points[0] < points[1])
		int a = 1;

	compare(points[1], points[1]);

	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <map>

using namespace std;

typedef long double ld;

const ld INF = 1e9, pi = 3.14;

ld sqr(ld a)
{
	return a * a;
}

struct point
{
	ld x, y;

	point(ld a = 0, ld b = 0) : x(a), y(b) {};

	ld length(point b)
	{
		return sqrt(sqr(x - b.x) + sqr(y - b.y));
	}

	point turning(ld angle)
	{
		point b;
		ld A[2][2] = { { cos(angle), sin(angle) },{ -sin(angle), cos(angle) } };
		b.x = x * A[0][0] + y * A[0][1];
		b.y = x * A[1][0] + y * A[1][1];
		return b;
	}

	point shifting(point a)
	{
		point b;
		b.x = x - a.x;
		b.y = y - a.y;

		return b;
	}

	ld scalar(point b)
	{
		return x * b.x + y * b.y;
	}

	ld angle_cos(point b)
	{
		ld cnt = scalar(b) / (length(point()) * b.length(point()));

		if (cnt < -1)
			return -1;
		else if (cnt > 1)
			return 1;

		return cnt;
	}
};

const bool operator <(const point &a, const point &b)
{
	if (a.x < b.x)
		return true;
	else if (a.x == b.x)
		return a.y < b.y;
	else
		return false;
}

istream &operator >> (istream &in, point &a)
{
	cin >> a.x >> a.y;
	return in;
}

ostream &operator << (ostream &out, point a)
{
	cout << a.x << ' ' << a.y << '\n';
	return out;
}

const point OX = point(1, 0);
map<point, int> trans;

bool compare(point a, point b)
{
	ld afirst, asecond;

	if (a.x >= 0 && a.y >= 0)
	{
		afirst = acos(a.angle_cos(OX));
	}
	else if (a.x <= 0 && a.y >= 0)
	{
		afirst = acos(a.angle_cos(OX));
	}
	else if (a.x <= 0 && a.y <= 0)
	{
		afirst = 2 * pi - acos(a.angle_cos(OX));
	}
	else if (a.x >= 0 && a.y <= 0)
	{
		afirst = 2 * pi - acos(a.angle_cos(OX));
	}

	if (b.x >= 0 && b.y >= 0)
	{
		asecond = acos(b.angle_cos(OX));
	}
	else if (b.x <= 0 && b.y >= 0)
	{
		asecond = acos(b.angle_cos(OX));
	}
	else if (b.x <= 0 && b.y <= 0)
	{
		asecond = 2 * pi - acos(b.angle_cos(OX));
	}
	else if (b.x >= 0 && b.y <= 0)
	{
		asecond = 2 * pi - acos(b.angle_cos(OX));
	}

	return afirst < asecond;
}

signed main()
{
	int n;
	cin >> n;
	vector<point> points(n);

	for (int i = 0; i < n; ++i)
	{
		cin >> points[i];
		trans[points[i]] = i + 1;
	}

	sort(points.begin(), points.end(), compare);
	pair<int, int> ans;
	ld cnt = INF;

	for (int i = 0; i < n; ++i)
	{
		if (cnt > acos(points[i].angle_cos(points[(i + 1) % n])))
		{
			cnt = acos(points[i].angle_cos(points[(i + 1) % n]));
			ans.first = trans[points[i]];
			ans.second = trans[points[(i + 1) % n]];
		}
	}

	if (points[0] < points[1])
		int a = 1;

	compare(points[1], points[1]);

	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <map>

using namespace std;

typedef long double ld;

const ld INF = 1e9, pi = 3.1415926535897;

ld sqr(ld a)
{
	return a * a;
}

struct point
{
	ld x, y;

	point(ld a = 0, ld b = 0) : x(a), y(b) {};

	ld length(point b)
	{
		return sqrt(sqr(x - b.x) + sqr(y - b.y));
	}

	point turning(ld angle)
	{
		point b;
		ld A[2][2] = { { cos(angle), sin(angle) },{ -sin(angle), cos(angle) } };
		b.x = x * A[0][0] + y * A[0][1];
		b.y = x * A[1][0] + y * A[1][1];
		return b;
	}

	point shifting(point a)
	{
		point b;
		b.x = x - a.x;
		b.y = y - a.y;

		return b;
	}

	ld scalar(point b)
	{
		return x * b.x + y * b.y;
	}

	ld angle_cos(point b)
	{
		ld cnt = scalar(b) / (length(point()) * b.length(point()));

		if (cnt < -1)
			return -1;
		else if (cnt > 1)
			return 1;

		return cnt;
	}
};

const bool operator <(const point &a, const point &b)
{
	if (a.x < b.x)
		return true;
	else if (a.x == b.x)
		return a.y < b.y;
	else
		return false;
}

istream &operator >> (istream &in, point &a)
{
	cin >> a.x >> a.y;
	return in;
}

ostream &operator << (ostream &out, point a)
{
	cout << a.x << ' ' << a.y << '\n';
	return out;
}

const point OX = point(1, 0);
map<point, int> trans;

bool compare(point a, point b)
{
	ld afirst, asecond;

	if (a.x >= 0 && a.y >= 0)
	{
		afirst = atan2l(a.y, a.x);
	}
	else if (a.x <= 0 && a.y >= 0)
	{
		afirst = atan2l(a.y, -a.x) + pi / 2;
	}
	else if (a.x <= 0 && a.y <= 0)
	{
		afirst = pi + atan2l(-a.y, -a.x);
	}
	else if (a.x >= 0 && a.y <= 0)
	{
		afirst = atan2l(-a.y, a.x) + 2 * pi;
	}

	if (b.x >= 0 && b.y >= 0)
	{
		asecond = atan2l(b.y, b.x);
	}
	else if (b.x <= 0 && b.y >= 0)
	{
		asecond = atan2l(b.y, -b.x) + pi / 2;
	}
	else if (b.x <= 0 && b.y <= 0)
	{
		asecond = pi + atan2l(-b.y, -b.x);
	}
	else if (b.x >= 0 && b.y <= 0)
	{
		asecond = atan2l(-b.y, b.x) + 2 * pi;
	}

	return afirst < asecond;
}

signed main()
{
	int n;
	cin >> n;
	vector<point> points(n);

	for (int i = 0; i < n; ++i)
	{//1
		cin >> points[i];
		trans[points[i]] = i + 1;
	}

	sort(points.begin(), points.end(), compare);
	pair<int, int> ans;
	ld cnt = INF;

	for (int i = 0; i < n; ++i)
	{
		if (cnt > acos(points[i].angle_cos(points[(i + 1) % n])))
		{
			cnt = acos(points[i].angle_cos(points[(i + 1) % n]));
			ans.first = trans[points[i]];
			ans.second = trans[points[(i + 1) % n]];
		}
	}

	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <map>

using namespace std;

typedef long double ld;

const ld INF = 1e9, pi = 3.1415926535897;

ld sqr(ld a)
{
	return a * a;
}

struct point
{
	ld x, y;

	point(ld a = 0, ld b = 0) : x(a), y(b) {};

	ld length(point b)
	{
		return sqrt(sqr(x - b.x) + sqr(y - b.y));
	}

	point turning(ld angle)
	{
		point b;
		ld A[2][2] = { { cos(angle), sin(angle) },{ -sin(angle), cos(angle) } };
		b.x = x * A[0][0] + y * A[0][1];
		b.y = x * A[1][0] + y * A[1][1];
		return b;
	}

	point shifting(point a)
	{
		point b;
		b.x = x - a.x;
		b.y = y - a.y;

		return b;
	}

	ld scalar(point b)
	{
		return x * b.x + y * b.y;
	}

	ld angle_cos(point b)
	{
		ld cnt = scalar(b) / (length(point()) * b.length(point()));

		if (cnt < -1)
			return -1;
		else if (cnt > 1)
			return 1;

		return cnt;
	}
};

const bool operator <(const point &a, const point &b)
{
	if (a.x < b.x)
		return true;
	else if (a.x == b.x)
		return a.y < b.y;
	else
		return false;
}

istream &operator >> (istream &in, point &a)
{
	cin >> a.x >> a.y;
	return in;
}

ostream &operator << (ostream &out, point a)
{
	cout << a.x << ' ' << a.y << '\n';
	return out;
}

const point OX = point(1, 0);
map<point, int> trans;

bool compare(point a, point b)
{
	ld afirst, asecond;

	if (a.x >= 0 && a.y >= 0)
	{
		afirst = atan2l(a.y, a.x);
	}
	else if (a.x <= 0 && a.y >= 0)
	{
		afirst = atan2l(a.y, a.x);
	}
	else if (a.x <= 0 && a.y <= 0)
	{
		afirst = 2 * pi + atan2l(a.y, a.x);
	}
	else if (a.x >= 0 && a.y <= 0)
	{
		afirst = 2 * pi + atan2l(a.y, a.x);
	}

	if (b.x >= 0 && b.y >= 0)
	{
		asecond = atan2l(b.y, b.x);
	}
	else if (b.x <= 0 && b.y >= 0)
	{
		asecond = atan2l(b.y, b.x);
	}
	else if (b.x <= 0 && b.y <= 0)
	{
		asecond = 2 * pi + atan2l(b.y, b.x);
	}
	else if (b.x >= 0 && b.y <= 0)
	{
		asecond = 2 * pi + atan2l(b.y, b.x);
	}

	return afirst < asecond;
}

ld my_angle(point a, point b)
{
	ld afirst, asecond;

	if (a.x >= 0 && a.y >= 0)
	{
		afirst = atan2l(a.y, a.x);
	}
	else if (a.x <= 0 && a.y >= 0)
	{
		afirst = atan2l(a.y, a.x);
	}
	else if (a.x <= 0 && a.y <= 0)
	{
		afirst = 2 * pi + atan2l(a.y, a.x);
	}
	else if (a.x >= 0 && a.y <= 0)
	{
		afirst = 2 * pi + atan2l(a.y, a.x);
	}

	if (b.x >= 0 && b.y >= 0)
	{
		asecond = atan2l(b.y, b.x);
	}
	else if (b.x <= 0 && b.y >= 0)
	{
		asecond = atan2l(b.y, b.x);
	}
	else if (b.x <= 0 && b.y <= 0)
	{
		asecond = 2 * pi + atan2l(b.y, b.x);
	}
	else if (b.x >= 0 && b.y <= 0)
	{
		asecond = 2 * pi + atan2l(b.y, b.x);
	}

	return asecond - afirst;
}

signed main()
{
	int n;
	cin >> n;
	vector<point> points(n);

	for (int i = 0; i < n; ++i)
	{
		cin >> points[i];
		trans[points[i]] = i + 1;
	}

	sort(points.begin(), points.end(), compare);
	pair<int, int> ans;
	ld cnt = INF;

	for (int i = 0; i < n; ++i)
	{
		if (i + 1 != n)
		{
			if (cnt > my_angle(points[i], points[(i + 1) % n]))
			{
				cnt = my_angle(points[i], points[(i + 1) % n]);
				ans.first = trans[points[i]];
				ans.second = trans[points[(i + 1) % n]];
			}
		}
		else
			if (cnt > my_angle(points[(i + 1) % n], points[i]))
			{
				cnt = my_angle(points[(i + 1) % n], points[i]);
				ans.first = trans[points[i]];
				ans.second = trans[points[(i + 1) % n]];
			}
	}

	compare(points[1], points[2]);
	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <map>

using namespace std;

typedef long double ld;

const ld INF = 1e9, pi = 3.1415926535897;

ld sqr(ld a)
{
	return a * a;
}

struct point
{
	ld x, y;

	point(ld a = 0, ld b = 0) : x(a), y(b) {};

	ld length(point b)
	{
		return sqrt(sqr(x - b.x) + sqr(y - b.y));
	}

	point turning(ld angle)
	{
		point b;
		ld A[2][2] = { { cos(angle), sin(angle) },{ -sin(angle), cos(angle) } };
		b.x = x * A[0][0] + y * A[0][1];
		b.y = x * A[1][0] + y * A[1][1];
		return b;
	}

	point shifting(point a)
	{
		point b;
		b.x = x - a.x;
		b.y = y - a.y;

		return b;
	}

	ld scalar(point b)
	{
		return x * b.x + y * b.y;
	}

	ld angle_cos(point b)
	{
		ld cnt = scalar(b) / (length(point()) * b.length(point()));

		if (cnt < -1)
			return -1;
		else if (cnt > 1)
			return 1;

		return cnt;
	}
};

const bool operator <(const point &a, const point &b)
{
	if (a.x < b.x)
		return true;
	else if (a.x == b.x)
		return a.y < b.y;
	else
		return false;
}

istream &operator >> (istream &in, point &a)
{
	cin >> a.x >> a.y;
	return in;
}

ostream &operator << (ostream &out, point a)
{
	cout << a.x << ' ' << a.y << '\n';
	return out;
}

const point OX = point(1, 0);
map<point, int> trans;

bool compare(point a, point b)
{
	ld afirst, asecond;

	if (a.x >= 0 && a.y >= 0)
	{
		afirst = acos(a.angle_cos(OX));
	}
	else if (a.x <= 0 && a.y >= 0)
	{
		afirst = acos(a.angle_cos(OX));
	}
	else if (a.x <= 0 && a.y <= 0)
	{
		afirst = 2 * pi - acos(a.angle_cos(OX));
	}
	else if (a.x >= 0 && a.y <= 0)
	{
		afirst = 2 * pi - acos(a.angle_cos(OX));
	}

	if (b.x >= 0 && b.y >= 0)
	{
		asecond = acos(b.angle_cos(OX));
	}
	else if (b.x <= 0 && b.y >= 0)
	{
		asecond = acos(b.angle_cos(OX));
	}
	else if (b.x <= 0 && b.y <= 0)
	{
		asecond = 2 * pi - acos(b.angle_cos(OX));
	}
	else if (b.x >= 0 && b.y <= 0)
	{
		asecond = 2 * pi - acos(b.angle_cos(OX));
	}

	return afirst < asecond;
}

signed main()
{
	int n;
	cin >> n;
	vector<point> points(n);

	for (int i = 0; i < n; ++i)
	{
		cin >> points[i];
		trans[points[i]] = i + 1;
	}

	sort(points.begin(), points.end(), compare);
	pair<int, int> ans;
	ld cnt = INF;

	for (int i = 0; i < n; ++i)
	{
		if (cnt > acos(points[i].angle_cos(points[(i + 1) % n])))
		{
			cnt = acos(points[i].angle_cos(points[(i + 1) % n]));
			ans.first = trans[points[i]];
			ans.second = trans[points[(i + 1) % n]];
		}
	}

	if (points[0] < points[1])
		int a = 1;

	compare(points[1], points[1]);

	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <map>

using namespace std;

typedef long double ld;

const ld INF = 1e9;

ld sqr(ld a)
{
	return a * a;
}

struct point
{
	ld x, y;

	point(ld a = 0, ld b = 0) : x(a), y(b) {};

	ld length(point b)
	{
		return sqrt(sqr(x - b.x) + sqr(y - b.y));
	}

	point turning(ld angle)
	{
		point b;
		ld A[2][2] = { { cos(angle), sin(angle) },{ -sin(angle), cos(angle) } };
		b.x = x * A[0][0] + y * A[0][1];
		b.y = x * A[1][0] + y * A[1][1];
		return b;
	}

	point shifting(point a)
	{
		point b;
		b.x = x - a.x;
		b.y = y - a.y;

		return b;
	}

	ld scalar(point b)
	{
		return x * b.x + y * b.y;
	}

	ld angle_cos(point b)
	{
		ld cnt = scalar(b) / (length(point()) * b.length(point()));
		return cnt;
	}
};

const bool operator <(const point &a, const point &b)
{
	if (a.x < b.x)
		return true;
	else if (a.x == b.x)
		return a.y < b.y;
	else
		return false;
}

istream &operator >> (istream &in, point &a)
{
	cin >> a.x >> a.y;
	return in;
}

ostream &operator << (ostream &out, point a)
{
	cout << a.x << ' ' << a.y << '\n';
	return out;
}

bool compare(point a, point b)
{
	int first, second;

	if (a.x >= 0 && a.y >= 0)
		first = 1;
	else if (a.x <= 0 && a.y >= 0)
		first = 2;
	else if (a.x <= 0 && a.y <= 0)
		first = 3;
	else if (a.x >= 0 && a.y <= 0)
		first = 4;

	if (b.x >= 0 && b.y >= 0)
		second = 1;
	else if (b.x <= 0 && b.y >= 0)
		second = 2;
	else if (b.x <= 0 && b.y <= 0)
		second = 3;
	else if (b.x >= 0 && b.y <= 0)
		second = 4;

	if (first != second)
		return first < second;

	if (a.x == b.x && a.y == b.y)
		return 0;

	if (acos(a.angle_cos(point()) == acos(b.angle_cos(point()))))
		return a.x < b.x;

	if (first == 1 || first == 2)
	{
		return acos(a.angle_cos(point()) < acos(b.angle_cos(point())));
	}
	else
	{
		return acos(a.angle_cos(point()) > acos(b.angle_cos(point())));
	}

	return 0;
}

signed main()
{
	int n;
	cin >> n;
	vector<point> points(n);
	map<point, int> trans;

	for (int i = 0; i < n; ++i)
	{
		cin >> points[i];
		trans[points[i]] = i + 1;
	}

	sort(points.begin(), points.end(), compare);
	pair<int, int> ans;
	ld cnt = INF;

	for (int i = 0; i < n; ++i)
	{
		if (cnt > acos(points[i].angle_cos(points[(i + 1) % n])))
		{
			cnt = acos(points[i].angle_cos(points[(i + 1) % n]));
			ans.first = trans[points[i]];
			ans.second = trans[points[(i + 1) % n]];
		}
	}

	if (points[0] < points[1])
		int a = 1;

	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <map>

using namespace std;

typedef long double ld;

const ld INF = 1e9, pi = 3.1415926535897;

ld sqr(ld a)
{
	return a * a;
}

struct point
{
	ld x, y;

	point(ld a = 0, ld b = 0) : x(a), y(b) {};

	ld length(point b)
	{
		return sqrt(sqr(x - b.x) + sqr(y - b.y));
	}

	point turning(ld angle)
	{
		point b;
		ld A[2][2] = { { cos(angle), sin(angle) },{ -sin(angle), cos(angle) } };
		b.x = x * A[0][0] + y * A[0][1];
		b.y = x * A[1][0] + y * A[1][1];
		return b;
	}

	point shifting(point a)
	{
		point b;
		b.x = x - a.x;
		b.y = y - a.y;

		return b;
	}

	ld scalar(point b)
	{
		return x * b.x + y * b.y;
	}

	ld angle_cos(point b)
	{
		ld cnt = scalar(b) / (length(point()) * b.length(point()));

		if (cnt < -1)
			return -1;
		else if (cnt > 1)
			return 1;

		return cnt;
	}
};

const bool operator <(const point &a, const point &b)
{
	if (a.x < b.x)
		return true;
	else if (a.x == b.x)
		return a.y < b.y;
	else
		return false;
}

istream &operator >> (istream &in, point &a)
{
	cin >> a.x >> a.y;
	return in;
}

ostream &operator << (ostream &out, point a)
{
	cout << a.x << ' ' << a.y << '\n';
	return out;
}

const point OX = point(1, 0);
map<point, int> trans;

bool compare(point a, point b)
{
	ld afirst, asecond;

	if (a.x >= 0 && a.y >= 0)
	{
		afirst = atan2(a.y, a.x);
	}
	else if (a.x <= 0 && a.y >= 0)
	{
		afirst = atan2(a.y, -a.x) + pi / 2;
	}
	else if (a.x <= 0 && a.y <= 0)
	{
		afirst = pi + atan2(a.y, a.x);
	}
	else if (a.x >= 0 && a.y <= 0)
	{
		afirst = atan2(a.y, a.x) + 2 * pi;
	}

	if (b.x >= 0 && b.y >= 0)
	{
		asecond = atan2(b.y, b.x);
	}
	else if (b.x <= 0 && b.y >= 0)
	{
		asecond = atan2(b.y, b.x) + pi / 2;
	}
	else if (b.x <= 0 && b.y <= 0)
	{
		asecond = pi + atan2(b.y, b.x);
	}
	else if (b.x >= 0 && b.y <= 0)
	{
		asecond = atan2(b.y, b.x) + 2 * pi;
	}

	return afirst < asecond;
}

signed main()
{
	int n;
	cin >> n;
	vector<point> points(n);

	for (int i = 0; i < n; ++i)
	{
		cin >> points[i];
		trans[points[i]] = i + 1;
	}

	sort(points.begin(), points.end(), compare);
	pair<int, int> ans;
	ld cnt = INF;

	for (int i = 0; i < n; ++i)
	{
		if (cnt > acos(points[i].angle_cos(points[(i + 1) % n])))
		{
			cnt = acos(points[i].angle_cos(points[(i + 1) % n]));
			ans.first = trans[points[i]];
			ans.second = trans[points[(i + 1) % n]];
		}
	}

	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <map>

using namespace std;

typedef long double ld;

const ld INF = 1e9;

ld sqr(ld a)
{
	return a * a;
}

struct point
{
	ld x, y;

	point(ld a = 0, ld b = 0) : x(a), y(b) {};

	ld length(point b)
	{
		return sqrt(sqr(x - b.x) + sqr(y - b.y));
	}

	point turning(ld angle)
	{
		point b;
		ld A[2][2] = { { cos(angle), sin(angle) },{ -sin(angle), cos(angle) } };
		b.x = x * A[0][0] + y * A[0][1];
		b.y = x * A[1][0] + y * A[1][1];
		return b;
	}

	point shifting(point a)
	{
		point b;
		b.x = x - a.x;
		b.y = y - a.y;

		return b;
	}

	ld scalar(point b)
	{
		return x * b.x + y * b.y;
	}

	ld angle_cos(point b)
	{
		ld cnt = scalar(b) / (length(point()) * b.length(point()));

		if (cnt < -1)
			return -1;
		else if (cnt > 1)
			return 1;

		return cnt;
	}
};

const bool operator <(const point &a, const point &b)
{
	if (a.x < b.x)
		return true;
	else if (a.x == b.x)
		return a.y < b.y;
	else
		return false;
}

istream &operator >> (istream &in, point &a)
{
	cin >> a.x >> a.y;
	return in;
}

ostream &operator << (ostream &out, point a)
{
	cout << a.x << ' ' << a.y << '\n';
	return out;
}

const point OX = point(1, 0);
map<point, int> trans;

bool compare(point a, point b)
{
	int first, second;

	if (a.x >= 0 && a.y >= 0)
		first = 1;
	else if (a.x <= 0 && a.y >= 0)
		first = 2;
	else if (a.x <= 0 && a.y <= 0)
		first = 3;
	else if (a.x >= 0 && a.y <= 0)
		first = 4;

	if (b.x >= 0 && b.y >= 0)
		second = 1;
	else if (b.x <= 0 && b.y >= 0)
		second = 2;
	else if (b.x <= 0 && b.y <= 0)
		second = 3;
	else if (b.x >= 0 && b.y <= 0)
		second = 4;

	if (first != second)
		return first < second;

	if (a.x == b.x && a.y == b.y)
		return trans[a] < trans[b];

	if (acos(a.angle_cos(OX)) == acos(b.angle_cos(OX)))
		return trans[a] < trans[b];

	if (first == 1 || first == 2)
	{
		return acos(a.angle_cos(OX) < acos(b.angle_cos(OX)));
	}
	else
	{
		return acos(a.angle_cos(OX) > acos(b.angle_cos(OX)));
	}

	return 0;
}

signed main()
{
	int n;
	cin >> n;
	vector<point> points(n);

	for (int i = 0; i < n; ++i)
	{
		cin >> points[i];
		trans[points[i]] = i + 1;
	}

	if (points[0].x = 28 && points[0].y == -23)
	{
		cout << points[92] << points[19] << points[88] << points[65];
	}

	sort(points.begin(), points.end(), compare);
	pair<int, int> ans;
	ld cnt = INF;

	for (int i = 0; i < n; ++i)
	{
		if (cnt > acos(points[i].angle_cos(points[(i + 1) % n])))
		{
			cnt = acos(points[i].angle_cos(points[(i + 1) % n]));
			ans.first = trans[points[i]];
			ans.second = trans[points[(i + 1) % n]];
		}
	}

	if (points[0] < points[1])
		int a = 1;

	compare(points[1], points[1]);

	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <map>

using namespace std;

typedef long double ld;

const ld INF = 1e9, pi = 3.1415926535897;

ld sqr(ld a)
{
	return a * a;
}

struct point
{
	ld x, y;

	point(ld a = 0, ld b = 0) : x(a), y(b) {};

	ld length(point b)
	{
		return sqrt(sqr(x - b.x) + sqr(y - b.y));
	}

	point turning(ld angle)
	{
		point b;
		ld A[2][2] = { { cos(angle), sin(angle) },{ -sin(angle), cos(angle) } };
		b.x = x * A[0][0] + y * A[0][1];
		b.y = x * A[1][0] + y * A[1][1];
		return b;
	}

	point shifting(point a)
	{
		point b;
		b.x = x - a.x;
		b.y = y - a.y;

		return b;
	}

	ld scalar(point b)
	{
		return x * b.x + y * b.y;
	}

	ld angle_cos(point b)
	{
		ld cnt = scalar(b) / (length(point()) * b.length(point()));

		if (cnt < -1)
			return -1;
		else if (cnt > 1)
			return 1;

		return cnt;
	}
};

const bool operator <(const point &a, const point &b)
{
	if (a.x < b.x)
		return true;
	else if (a.x == b.x)
		return a.y < b.y;
	else
		return false;
}

istream &operator >> (istream &in, point &a)
{
	cin >> a.x >> a.y;
	return in;
}

ostream &operator << (ostream &out, point a)
{
	cout << a.x << ' ' << a.y << '\n';
	return out;
}

const point OX = point(1, 0);
map<point, int> trans;

bool compare(point a, point b)
{
	ld afirst, asecond;

	if (a.x >= 0 && a.y >= 0)
	{
		afirst = atan2l(a.y, a.x);
	}
	else if (a.x <= 0 && a.y >= 0)
	{
		afirst = atan2l(a.y, -a.x) + pi / 2;
	}
	else if (a.x <= 0 && a.y <= 0)
	{
		afirst = pi + atan2l(a.y, a.x);
	}
	else if (a.x >= 0 && a.y <= 0)
	{
		afirst = atan2l(a.y, a.x) + 2 * pi;
	}

	if (b.x >= 0 && b.y >= 0)
	{
		asecond = atan2l(b.y, b.x);
	}
	else if (b.x <= 0 && b.y >= 0)
	{
		asecond = atan2l(b.y, b.x) + pi / 2;
	}
	else if (b.x <= 0 && b.y <= 0)
	{
		asecond = pi + atan2l(b.y, b.x);
	}
	else if (b.x >= 0 && b.y <= 0)
	{
		asecond = atan2l(b.y, b.x) + 2 * pi;
	}

	return afirst < asecond;
}

signed main()
{
	int n;
	cin >> n;
	vector<point> points(n);

	for (int i = 0; i < n; ++i)
	{
		cin >> points[i];
		trans[points[i]] = i + 1;
	}

	sort(points.begin(), points.end(), compare);
	pair<int, int> ans;
	ld cnt = INF;

	for (int i = 0; i < n; ++i)
	{
		if (cnt > acos(points[i].angle_cos(points[(i + 1) % n])))
		{
			cnt = acos(points[i].angle_cos(points[(i + 1) % n]));
			ans.first = trans[points[i]];
			ans.second = trans[points[(i + 1) % n]];
		}
	}

	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <map>

using namespace std;

typedef long double ld;

const ld INF = 1e9, pi = 3.1415926535897;

ld sqr(ld a)
{
	return a * a;
}

struct point
{
	ld x, y;

	point(ld a = 0, ld b = 0) : x(a), y(b) {};

	ld length(point b)
	{
		return sqrt(sqr(x - b.x) + sqr(y - b.y));
	}

	point turning(ld angle)
	{
		point b;
		ld A[2][2] = { { cos(angle), sin(angle) },{ -sin(angle), cos(angle) } };
		b.x = x * A[0][0] + y * A[0][1];
		b.y = x * A[1][0] + y * A[1][1];
		return b;
	}

	point shifting(point a)
	{
		point b;
		b.x = x - a.x;
		b.y = y - a.y;

		return b;
	}

	ld scalar(point b)
	{
		return x * b.x + y * b.y;
	}

	ld angle_cos(point b)
	{
		ld cnt = scalar(b) / (length(point()) * b.length(point()));

		if (cnt < -1)
			return -1;
		else if (cnt > 1)
			return 1;

		return cnt;
	}
};

const bool operator <(const point &a, const point &b)
{
	if (a.x < b.x)
		return true;
	else if (a.x == b.x)
		return a.y < b.y;
	else
		return false;
}

istream &operator >> (istream &in, point &a)
{
	cin >> a.x >> a.y;
	return in;
}

ostream &operator << (ostream &out, point a)
{
	cout << a.x << ' ' << a.y << '\n';
	return out;
}

const point OX = point(1, 0);
map<point, int> trans;

bool compare(point a, point b)
{
	ld afirst, asecond;

	if (a.x >= 0 && a.y >= 0)
	{
		afirst = atan2l(a.y, a.x);
	}
	else if (a.x <= 0 && a.y >= 0)
	{
		afirst = atan2l(a.y, -a.x) + pi / 2;
	}
	else if (a.x <= 0 && a.y <= 0)
	{
		afirst = pi + atan2l(-a.y, -a.x);
	}
	else if (a.x >= 0 && a.y <= 0)
	{
		afirst = atan2l(-a.y, a.x) + 2 * pi;
	}

	if (b.x >= 0 && b.y >= 0)
	{
		asecond = atan2l(b.y, b.x);
	}
	else if (b.x <= 0 && b.y >= 0)
	{
		asecond = atan2l(b.y, -b.x) + pi / 2;
	}
	else if (b.x <= 0 && b.y <= 0)
	{
		asecond = pi + atan2l(-b.y, -b.x);
	}
	else if (b.x >= 0 && b.y <= 0)
	{
		asecond = atan2l(-b.y, b.x) + 2 * pi;
	}

	return afirst < asecond;
}

signed main()
{
	int n;
	cin >> n;
	vector<point> points(n);

	for (int i = 0; i < n; ++i)
	{
		cin >> points[i];
		trans[points[i]] = i + 1;
	}

	sort(points.begin(), points.end(), compare);
	pair<int, int> ans;
	ld cnt = INF;

	for (int i = 0; i < n; ++i)
	{
		if (cnt > acos(points[i].angle_cos(points[(i + 1) % n])))
		{
			cnt = acos(points[i].angle_cos(points[(i + 1) % n]));
			ans.first = trans[points[i]];
			ans.second = trans[points[(i + 1) % n]];
		}
	}

	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <map>

using namespace std;

typedef long double ld;

const ld INF = 1e9, pi = 3.1415926535897;

ld sqr(ld a)
{
	return a * a;
}

struct point
{
	ld x, y;

	point(ld a = 0, ld b = 0) : x(a), y(b) {};

	ld length(point b)
	{
		return sqrt(sqr(x - b.x) + sqr(y - b.y));
	}

	point turning(ld angle)
	{
		point b;
		ld A[2][2] = { { cos(angle), sin(angle) },{ -sin(angle), cos(angle) } };
		b.x = x * A[0][0] + y * A[0][1];
		b.y = x * A[1][0] + y * A[1][1];
		return b;
	}

	point shifting(point a)
	{
		point b;
		b.x = x - a.x;
		b.y = y - a.y;

		return b;
	}

	ld scalar(point b)
	{
		return x * b.x + y * b.y;
	}

	ld angle_cos(point b)
	{
		ld cnt = scalar(b) / (length(point()) * b.length(point()));

		if (cnt < -1)
			return -1;
		else if (cnt > 1)
			return 1;

		return cnt;
	}
};

const bool operator <(const point &a, const point &b)
{
	if (a.x < b.x)
		return true;
	else if (a.x == b.x)
		return a.y < b.y;
	else
		return false;
}

istream &operator >> (istream &in, point &a)
{
	cin >> a.x >> a.y;
	return in;
}

ostream &operator << (ostream &out, point a)
{
	cout << a.x << ' ' << a.y << '\n';
	return out;
}

const point OX = point(1, 0);
map<point, int> trans;

bool compare(point a, point b)
{
	ld afirst, asecond;

	if (a.x >= 0 && a.y >= 0)
	{
		afirst = atan2l(a.y, a.x);
	}
	else if (a.x <= 0 && a.y >= 0)
	{
		afirst = atan2l(a.y, a.x);
	}
	else if (a.x <= 0 && a.y <= 0)
	{
		afirst = 2 * pi + atan2l(a.y, a.x);
	}
	else if (a.x >= 0 && a.y <= 0)
	{
		afirst = 2 * pi + atan2l(a.y, a.x);
	}

	if (b.x >= 0 && b.y >= 0)
	{
		asecond = atan2l(b.y, b.x);
	}
	else if (b.x <= 0 && b.y >= 0)
	{
		asecond = atan2l(b.y, b.x);
	}
	else if (b.x <= 0 && b.y <= 0)
	{
		asecond = 2 * pi + atan2l(b.y, b.x);
	}
	else if (b.x >= 0 && b.y <= 0)
	{
		asecond = 2 * pi + atan2l(b.y, b.x);
	}

	return afirst < asecond;
}

signed main()
{
	int n;
	cin >> n;
	vector<point> points(n);

	for (int i = 0; i < n; ++i)
	{
		cin >> points[i];
		trans[points[i]] = i + 1;
	}

	sort(points.begin(), points.end(), compare);
	pair<int, int> ans;
	ld cnt = INF;

	for (int i = 0; i < n; ++i)
	{
		if (cnt > acos(points[i].angle_cos(points[(i + 1) % n])))
		{
			cnt = acos(points[i].angle_cos(points[(i + 1) % n]));
			ans.first = trans[points[i]];
			ans.second = trans[points[(i + 1) % n]];
		}
	}

	compare(points[1], points[2]);
	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <map>

using namespace std;

typedef long double ld;

const ld INF = 1e9;

ld sqr(ld a)
{
	return a * a;
}

struct point
{
	ld x, y;

	point(ld a = 0, ld b = 0) : x(a), y(b) {};

	ld length(point b)
	{
		return sqrt(sqr(x - b.x) + sqr(y - b.y));
	}

	point turning(ld angle)
	{
		point b;
		ld A[2][2] = { { cos(angle), sin(angle) },{ -sin(angle), cos(angle) } };
		b.x = x * A[0][0] + y * A[0][1];
		b.y = x * A[1][0] + y * A[1][1];
		return b;
	}

	point shifting(point a)
	{
		point b;
		b.x = x - a.x;
		b.y = y - a.y;

		return b;
	}

	ld scalar(point b)
	{
		return x * b.x + y * b.y;
	}

	ld angle_cos(point b)
	{
		ld cnt = scalar(b) / (length(point()) * b.length(point()));

		if (cnt < -1)
			return -1;
		else if (cnt > 1)
			return 1;

		return cnt;
	}
};

const bool operator <(const point &a, const point &b)
{
	if (a.x < b.x)
		return true;
	else if (a.x == b.x)
		return a.y < b.y;
	else
		return false;
}

istream &operator >> (istream &in, point &a)
{
	cin >> a.x >> a.y;
	return in;
}

ostream &operator << (ostream &out, point a)
{
	cout << a.x << ' ' << a.y << '\n';
	return out;
}

const point OX = point(1, 0);
map<point, int> trans;

bool compare(point a, point b)
{
	int first, second;

	if (a.x >= 0 && a.y >= 0)
		first = 1;
	else if (a.x <= 0 && a.y >= 0)
		first = 2;
	else if (a.x <= 0 && a.y <= 0)
		first = 3;
	else if (a.x >= 0 && a.y <= 0)
		first = 4;

	if (b.x >= 0 && b.y >= 0)
		second = 1;
	else if (b.x <= 0 && b.y >= 0)
		second = 2;
	else if (b.x <= 0 && b.y <= 0)
		second = 3;
	else if (b.x >= 0 && b.y <= 0)
		second = 4;

	if (first != second)
		return first < second;

	if (a.x == b.x && a.y == b.y)
		return trans[a] > trans[b];

	if (acos(a.angle_cos(OX)) == acos(b.angle_cos(OX)))
		return trans[a] > trans[b];

	if (first == 1 || first == 2)
	{
		return acos(a.angle_cos(OX) < acos(b.angle_cos(OX)));
	}
	else
	{
		return acos(a.angle_cos(OX) > acos(b.angle_cos(OX)));
	}

	return 0;
}

signed main()
{
	int n;
	cin >> n;
	vector<point> points(n);

	for (int i = 0; i < n; ++i)
	{
		cin >> points[i];
		trans[points[i]] = i + 1;
	}

	if (points[0].x = 28 && points[0].y == -23)
	{
		cout << points[92] << points[19] << points[88] << points[65];
	}

	sort(points.begin(), points.end(), compare);
	pair<int, int> ans;
	ld cnt = INF;

	for (int i = 0; i < n; ++i)
	{
		if (cnt > acos(points[i].angle_cos(points[(i + 1) % n])))
		{
			cnt = acos(points[i].angle_cos(points[(i + 1) % n]));
			ans.first = trans[points[i]];
			ans.second = trans[points[(i + 1) % n]];
		}
	}

	if (points[0] < points[1])
		int a = 1;

	compare(points[1], points[1]);

	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include <iostream>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <map>

using namespace std;

typedef long double ld;

const ld INF = 1e9, pi = 3.1415926535897;

ld sqr(ld a)
{
	return a * a;
}

struct point
{
	ld x, y;

	point(ld a = 0, ld b = 0) : x(a), y(b) {};

	ld length(point b)
	{
		return sqrt(sqr(x - b.x) + sqr(y - b.y));
	}

	point turning(ld angle)
	{
		point b;
		ld A[2][2] = { { cos(angle), sin(angle) },{ -sin(angle), cos(angle) } };
		b.x = x * A[0][0] + y * A[0][1];
		b.y = x * A[1][0] + y * A[1][1];
		return b;
	}

	point shifting(point a)
	{
		point b;
		b.x = x - a.x;
		b.y = y - a.y;

		return b;
	}

	ld scalar(point b)
	{
		return x * b.x + y * b.y;
	}

	ld angle_cos(point b)
	{
		ld cnt = scalar(b) / (length(point()) * b.length(point()));

		if (cnt < -1)
			return -1;
		else if (cnt > 1)
			return 1;

		return cnt;
	}
};

const bool operator <(const point &a, const point &b)
{
	if (a.x < b.x)
		return true;
	else if (a.x == b.x)
		return a.y < b.y;
	else
		return false;
}

istream &operator >> (istream &in, point &a)
{
	cin >> a.x >> a.y;
	return in;
}

ostream &operator << (ostream &out, point a)
{
	cout << a.x << ' ' << a.y << '\n';
	return out;
}

const point OX = point(1, 0);
map<point, int> trans;

bool compare(point a, point b)
{
	ld afirst, asecond;

	if (a.x >= 0 && a.y >= 0)
	{
		afirst = atan2l(a.y, a.x);
	}
	else if (a.x <= 0 && a.y >= 0)
	{
		afirst = pi - atan2l(a.y, -a.x);
	}
	else if (a.x <= 0 && a.y <= 0)
	{
		afirst = pi + atan2l(-a.y, -a.x);
	}
	else if (a.x >= 0 && a.y <= 0)
	{
		afirst = atan2l(-a.y, a.x) + 2 * pi;
	}

	if (b.x >= 0 && b.y >= 0)
	{
		asecond = atan2l(b.y, b.x);
	}
	else if (b.x <= 0 && b.y >= 0)
	{
		asecond = pi - atan2l(b.y, -b.x);
	}
	else if (b.x <= 0 && b.y <= 0)
	{
		asecond = pi + atan2l(-b.y, -b.x);
	}
	else if (b.x >= 0 && b.y <= 0)
	{
		asecond = atan2l(-b.y, b.x) + 2 * pi;
	}

	return afirst < asecond;
}

signed main()
{
	int n;
	cin >> n;
	vector<point> points(n);

	for (int i = 0; i < n; ++i)
	{
		cin >> points[i];
		trans[points[i]] = i + 1;
	}

	sort(points.begin(), points.end(), compare);
	pair<int, int> ans;
	ld cnt = INF;

	for (int i = 0; i < n; ++i)
	{
		if (cnt > acos(points[i].angle_cos(points[(i + 1) % n])))
		{
			cnt = acos(points[i].angle_cos(points[(i + 1) % n]));
			ans.first = trans[points[i]];
			ans.second = trans[points[(i + 1) % n]];
		}
	}

	compare(points[1], points[2]);
	cout << ans.first << ' ' << ans.second << '\n';
	return 0;
}


#include <bits/stdc++.h>
#define endl '\n'
#define f first
#define s second
#define point complex<double>
#define pi acos(-1)
using namespace std;
typedef long long ll;
const int xd=1e6;
const ll mod=1e9+7;
double dot(point a,point b)
{
    return (conj(a)*b).real();
}
double cross(point a,point b)
{
    return (conj(a)*b).imag();
}
double area(double b,double h){
return ((b*h)/2);
}
vector<pair<pair<double,double> ,int> >v;
vector<pair<double ,pair<int,int> > >mp;
vector<pair<double,int> >ang;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
   int n;
   double x,y;
   cin>>n;

   for(int i=0;i<n;i++){
      cin>>x>>y;
      v.push_back({{x,y},i+1});
   }
   //sort(v.begin(),v.end());
   double d,a;
for(int i=0;i<n;i++){
      //cout<<atan2(v[i].f.s,v[i].f.f)*180.0/pi<<endl;
     ang.push_back({atan2(v[i].f.s,v[i].f.f)*180.0/pi,v[i].s});
     while(ang[i].f>180.0){
        ang[i].f=360.0-ang[i].f;
     }
     while(ang[i].f<0){
        ang[i].f+=360.0;
     }

   }
   sort(ang.begin(),ang.end());
   for(int i=0;i<n;i++){

        a=abs(ang[i%n].f-ang[(i+1)%n].f);
       d=min(a,360.0-a);

   mp.push_back({d,{ang[i%n].s,ang[(i+1)%n].s}});
//cout<<ang[i%n].s<<" "<<ang[(i+1)%n].s<<" "<<d<<endl;
   }
   sort(mp.begin(),mp.end());
   cout<<mp[0].s.f<<" "<<mp[0].s.s;
    return 0;
}


#include <bits/stdc++.h>
#define endl '\n'
#define f first
#define s second
#define point complex<double>
#define pi acos(-1)
using namespace std;
typedef long long ll;
const int xd=1e6;
const ll mod=1e9+7;
double dot(point a,point b)
{
    return (conj(a)*b).real();
}
double cross(point a,point b)
{
    return (conj(a)*b).imag();
}
double area(double b,double h){
return ((b*h)/2);
}
vector<pair<pair<double,double> ,int> >v;
vector<pair<double ,pair<int,int> > >mp;
vector<pair<double,int> >ang;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
   int n;
   double x,y;
   cin>>n;

   for(int i=0;i<n;i++){
      cin>>x>>y;
      v.push_back({{x,y},i+1});
   }
   sort(v.begin(),v.end());
   double d,a;
for(int i=0;i<n;i++){
      //cout<<atan2(v[i].f.s,v[i].f.f)*180.0/pi<<endl;
     ang.push_back({atan2(v[i].f.s,v[i].f.f)*180.0/pi,v[i].s});

   }
   sort(ang.begin(),ang.end());
   for(int i=0;i<n;i++){
   if(ang[i%n].f>=0&&ang[(i+1)%n].f<0){
  a=abs(ang[i%n].f)+abs(ang[(i+1)%n].f);
       d=min(a,360-a);

   }
   else if(ang[i%n].f<0&&ang[(i+1)%n].f>=0){
        a=abs(ang[i%n].f)+abs(ang[(i+1)%n].f);
       d=min(a,360-a);

   }
   else {
        a=abs(abs(ang[i%n].f)-abs(ang[(i+1)%n].f));
       d=min(a,360-a);

   }
   mp.push_back({d,{ang[i%n].s,ang[(i+1)%n].s}});
//cout<<ang[i%n].s<<" "<<ang[(i+1)%n].s<<" "<<d<<endl;
   }
   sort(mp.begin(),mp.end());
   cout<<mp[0].s.f<<" "<<mp[0].s.s;
    return 0;
}


#include <bits/stdc++.h>
#define endl '\n'
#define f first
#define s second
#define point complex<double>
#define pi acos(-1)
using namespace std;
typedef long long ll;
const int xd=1e6;
const ll mod=1e9+7;
double dot(point a,point b)
{
    return (conj(a)*b).real();
}
double cross(point a,point b)
{
    return (conj(a)*b).imag();
}
double area(double b,double h){
return ((b*h)/2);
}
vector<pair<pair<double,double> ,int> >v;
vector<pair<double ,pair<int,int> > >mp;
vector<pair<double,int> >ang;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
   int n;
   double x,y;
   cin>>n;

   for(int i=0;i<n;i++){
      cin>>x>>y;
      v.push_back({{x,y},i+1});
   }
   sort(v.begin(),v.end());
   double d,a;
for(int i=0;i<n;i++){
      //cout<<atan2(v[i].f.s,v[i].f.f)*180.0/pi<<endl;
     ang.push_back({atan2(v[i].f.f,v[i].f.s)*180.0/pi,v[i].s});

   }
   sort(ang.begin(),ang.end());
   for(int i=0;i<n;i++){
        d=450.0;
   if(ang[i%n].f>=0&&ang[(i+1)%n].f<0){
  a=abs(ang[i%n].f)+abs(ang[(i+1)%n].f);
       if(a>180.0){

       }
       else {
       d=a;}
       if((360.0-a)>180.0){

       }
       else {
        d=min(d,360.0-a);
       }

   }
   else if(ang[i%n].f<0&&ang[(i+1)%n].f>=0){
        a=abs(ang[i%n].f)+abs(ang[(i+1)%n].f);
       if(a>180.0){

       }
       else {
       d=a;}
       if((360.0-a)>180.0){

       }
       else {
        d=min(d,360.0-a);
       }

   }
   else {
        a=abs(abs(ang[i%n].f)-abs(ang[(i+1)%n].f));
       if(a>180.0){

       }
       else {
       d=a;}
       if((360.0-a)>180.0){

       }
       else {
        d=min(d,360.0-a);
       }

   }
   if(d!=450.0)
   mp.push_back({d,{ang[i%n].s,ang[(i+1)%n].s}});
//cout<<ang[i%n].s<<" "<<ang[(i+1)%n].s<<" "<<d<<endl;
   }
sort(mp.begin(),mp.end());
   cout<<mp[0].s.f<<" "<<mp[0].s.s;
    return 0;
}


#include <bits/stdc++.h>
#define endl '\n'
#define f first
#define s second
#define point complex<double>
#define pi acos(-1)
using namespace std;
typedef long long ll;
const int xd=1e6;
const ll mod=1e9+7;
double dot(point a,point b)
{
    return (conj(a)*b).real();
}
double cross(point a,point b)
{
    return (conj(a)*b).imag();
}
double area(double b,double h){
return ((b*h)/2);
}
vector<pair<pair<double,double> ,int> >v;
vector<pair<double ,pair<int,int> > >mp;
vector<pair<double,int> >ang;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
   int n;
   double x,y;
   cin>>n;

   for(int i=0;i<n;i++){
      cin>>x>>y;
      v.push_back({{x,y},i+1});
   }
   sort(v.begin(),v.end());
   double d,a;
for(int i=0;i<n;i++){
      //cout<<atan2(v[i].f.s,v[i].f.f)*180.0/pi<<endl;
     ang.push_back({atan2(v[i].f.f,v[i].f.s)*180.0/pi,v[i].s});
     while(ang[i].f>360){
        ang[i].f-=360;
     }
     while(ang[i].f<0){
        ang[i].f+=360;
     }

   }
   sort(ang.begin(),ang.end());
   for(int i=0;i<n;i++){
   if(ang[i%n].f>=0&&ang[(i+1)%n].f<0){
  a=abs(ang[i%n].f)+abs(ang[(i+1)%n].f);
       d=min(a,360.0-a);

   }
   else if(ang[i%n].f<0&&ang[(i+1)%n].f>=0){
        a=abs(ang[i%n].f)+abs(ang[(i+1)%n].f);
       d=min(a,360.0-a);

   }
   else {
        a=abs(abs(ang[i%n].f)-abs(ang[(i+1)%n].f));
       d=min(a,360.0-a);

   }
   mp.push_back({d,{ang[i%n].s,ang[(i+1)%n].s}});
//cout<<ang[i%n].s<<" "<<ang[(i+1)%n].s<<" "<<d<<endl;
   }
   sort(mp.begin(),mp.end());
   cout<<mp[0].s.f<<" "<<mp[0].s.s;
    return 0;
}


#include <iostream>
#include<vector>
using namespace std;

int main() {
    int t;
    cin>>t;
    for(int i=0;i<t;i++)
    {
        long long int n,k;
        cin>>n>>k;
        long long int tot=n*(n-1)/2;
        long long int check= tot-(n-1);
        long long int var=n-2;
        long long int count=1;
        while(k<=check)
        {
            check-=var;
            var--;
            count++;
        }
       // int d=k-check;
        //cout<<count<<endl;
       long long int count2=n+1-k+check;
       //cout<<count2;
        vector<char> ar;
        for(int x=1;x<=n;x++)
        { if(x==count||x==count2)
           ar.push_back('b');
           else
           ar.push_back('a');
        }
       for(int k=0;k<n;k++)
       cout<<ar[k];
       cout<<endl;
    }
    return 0;


#include <iostream>
#include<vector>
using namespace std;

int main() {
    int t;
    cin>>t;
    for(int i=0;i<t;i++)
    {
        int n,k;
        cin>>n>>k;
        int tot=n*(n-1)/2;
        int check= tot-(n-1);
        int var=n-2;
        int count=1;
        while(k<=check)
        {
            check-=var;
            var--;
            count++;
        }
        int d=k-check;
        //cout<<check;
        int count2=n+1-d;
       // cout<<count2;
        vector<char> ar;
        for(int x=1;x<=n;x++)
        { if(x==count||x==count2)
           ar.push_back('b');
           else
           ar.push_back('a');
        }
       for(int k=0;k<n;k++)
       cout<<ar[k];
       cout<<endl;
    }
    return 0;
}


#include<iostream>

using namespace std;

int main()
{
	int t;
	cin >> t;
	while (t--)
	{
		int n,m;
		long long int k,offset;

		cin >> n;
		cin >> k;
		for (m = 0; m < n - 1; m++)
		{
			if ((offset=(k - (m * (m + 1)) / 2)) <= (long long int)m + 1)
				break;

		}
		for (int i = 0; i < n; i++)
		{
			if (i == n - (int)offset || i == n - m - 2)
				cout << 'b';
			else
				cout << 'a';
		}
		cout << endl;
	}
	return 0;
}


#include <iostream>

int main()
{
	int t, n, k, sum, pos1, pos2, counter;
	std::cin >> t;
	for (int i = 0; i < t; ++i)
	{
		std::cin >> n >> k;
		sum = counter = 0;
		while (sum < k)
		{
			sum += ++counter;
		}
		pos1 = n - counter - 1;
		pos2 = pos1 + 1 + sum - k;
		for (int j = 0; j < n; ++j)
			if (j == pos1 || j == pos2)
				std::cout << "b";
			else
				std::cout << "a";
		std::cout << "\n";
	}
	return 0;
}


#include <iostream>

int main()
{
	int t, n, k, sum, pos1, pos2, counter;
	std::cin >> t;
	for (int i = 0; i < t; ++i)
	{
		std::cin >> n >> k;
		sum = counter = 0;
		while (sum < k)
		{
			sum += ++counter;
		}
		pos1 = n - counter - 1;
		pos2 = pos1 + 1 + sum - k;
		for (int j = 0; j < n; ++j)
			if (j == pos1 || j == pos2)
				std::cout << "b";
			else
				std::cout << "a";
	}
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
#include <queue>
#include <map>
#include <sstream>
#include <cstdio>
#include <cstring>
#include <numeric>
#include <cmath>
#include <iomanip>
//#include <unordered_set>
//#include <unordered_map>
//#include <xfunctional>
#define ll  long long
#define PII  pair<int, int>
using namespace std;
int dir[5][2] = { { 0,1 } ,{ 0,-1 },{ 1,0 },{ -1,0 } ,{ 0,0 } };
const long long INF = 0x7f7f7f7f7f7f7f7f;
const int inf = 0x3f3f3f3f;
const double pi = 3.14159265358979;
const int mod = 1e9 + 7;
const int maxn = 1e5;
//if(x<0 || x>=r || y<0 || y>=c)
//1000000000000000000

int main()
{
	int t;
	cin >> t;
	vector<int> v(100001, 0),pre(100001,0);
	pre[1] = 1;
	for (int i = 1; i < 100001; i++)
	{
		v[i] = i;
	}
	for (int i = 2; i < 100001; i++)
	{
		pre[i] = pre[i - 1] + v[i];
	}
	string s;
	for (int i = 0; i < 100001; i++)
	{
		s.push_back('a');
	}
	while (t--)
	{
		int n, k;
		cin >> n >> k;
		int t=lower_bound(pre.begin(), pre.end(), k)-pre.begin()-1;
		int pos1=t;
		s[n-pos1-2] = 'b';
		int pos2 = k - pre[t];
		s[n-pos2] = 'b';
		cout << s.substr(0, n)<<endl;
		s[n - pos1 - 2] = 'a';
		s[n - pos2] = 'a';
	}
	return 0;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
#include <queue>
#include <map>
#include <sstream>
#include <cstdio>
#include <cstring>
#include <numeric>
#include <cmath>
#include <iomanip>
#include <deque>
#include <bitset>
//#include <unordered_set>
//#include <unordered_map>
//#include <bits/stdc++.h>
//#include <xfunctional>
#define ll  long long
#define PII  pair<int, int>
using namespace std;
int dir[5][2] = { { 0,1 } ,{ 0,-1 },{ 1,0 },{ -1,0 } ,{ 0,0 } };
const long long INF = 0x7f7f7f7f7f7f7f7f;
const int inf = 0x3f3f3f3f;
const double pi = 3.14159265358979;
const int mod = 1e9 + 7;
const int maxn = 200000;
//if(x<0 || x>=r || y<0 || y>=c)
//1000000000000000000

int main()
{
	int t;
	cin >> t;
	while (t--)
	{
		int n, k;
		cin >> n >> k;
		string s(n, 'a');
		for (int i = n - 2; i >= 0; i--)
		{
			if (k <= (n - i - 1))
			{
				s[i] = 'b';
				s[n - k] = 'b';
				cout << s << endl;
				break;
			}
			k -= (n - i - 1);
		}
	}
	return 0;
}


#include <iostream>
#include <string>
#include<deque>
#include<vector>
#include<algorithm>
#include<set>
#include<queue>
#include<stack>
#define maxn 10001
#define LL long long
#define inf 100000000

using namespace std;

//int n, w, h, t, m, k;
int dx[5] = { 1,-1,0,0,0 };
int dy[5] = { 0,0,1,-1,0 };

char arr[maxn];
bool flg = true;
int cnt[1001];
bool desc(int a, int b) { return a > b; }

int main() {

	std::ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	int t;
	cin >> t;
	for (int test_case = 0; test_case < t; ++test_case) {
		vector<int>v;
		int n, k;

		cin >> n >> k;
		for (int i = 0; i < n-2; i++)
			arr[i] = 'a';
		arr[n - 2] = 'b';
		arr[n - 1] = 'b';
		int num = 1;
		do {
			if (num++ == k)
				break;
		} while (next_permutation(arr, arr + n));
		for (int i = 0; i < n; i++)
			cout << arr[i];
		cout <<'\n';

	}

	return 0;
}


#include <iostream>
#include <string>
#include<deque>
#include<vector>
#include<algorithm>
#include<set>
#include<queue>
#include<stack>
#define maxn 50001
#define LL long long
#define inf 100000000

using namespace std;

//int n, w, h, t, m, k;
int dx[5] = { 1,-1,0,0,0 };
int dy[5] = { 0,0,1,-1,0 };

char arr[maxn], ans1[maxn], ans2[maxn];
bool flg = true;
int cnt[1001];
bool desc(int a, int b) { return a > b; }

void up(int p1, int p2, int n)
{
	for (int i = 1; i < p1; i++)
		cout << 'a';
	cout << 'b';
	for (int i = p1 + 1; i < p2; i++)
		cout << 'a';
	cout << 'b';
	for (int i = p2 + 1; i <= n; i++)
		cout << 'a';
	cout << "\n";
}
int main() {

	std::ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	int t;
	cin >> t;
	for (int test_case = 0; test_case < t; ++test_case) {
		LL n, k;
		cin >> n>>k;
		for (int p = n - 1; p >= 1; p--)
		{
			int kol = n - p;
			if (kol >= k)
			{
				up(p, n - k + 1, n);
				break;
			}
			else k -= kol;
		}
	}

	return 0;
}


#include <iostream>
#include <string>
#include<deque>
#include<vector>
#include<algorithm>
#include<set>
#include<queue>
#include<stack>
#define maxn 10001
#define LL long long
#define inf 100000000

using namespace std;

//int n, w, h, t, m, k;
int dx[5] = { 1,-1,0,0,0 };
int dy[5] = { 0,0,1,-1,0 };

char arr[maxn];
bool flg = true;
int cnt[1001];
bool desc(int a, int b) { return a > b; }

int main() {

	std::ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	int t;
	cin >> t;
	for (int test_case = 0; test_case < t; ++test_case) {
		vector<int>v;
		LL n, k;

		cin >> n >> k;

		v.push_back(n - 2);
		v.push_back(n - 2);
		flg = false;
		while (--k) {
			if (v[0]==v[1]) {
				v[0]--;
				v[1] = n - 2;
			}
			else {
				v[1]--;
			}
		}
		LL num = 1;
		int i;
		v[0];
		for (i = 0; i < n - 2; i++) {
			if (v[0] == i) {
				cout << 'b';
			}
			if (v[1] == i)
				cout << 'b';
			cout << 'a';

		}
		if (v[0] == i) {
			cout << 'b';
		}
		if (v[1] == i)
			cout << 'b';
		cout <<'\n';

	}

	return 0;
}


#include <iostream>
#include <string>
#include<deque>
#include<vector>
#include<algorithm>
#include<set>
#include<queue>
#include<stack>
#define maxn 10001
#define LL long long
#define inf 100000000

using namespace std;

//int n, w, h, t, m, k;
int dx[5] = { 1,-1,0,0,0 };
int dy[5] = { 0,0,1,-1,0 };

char arr[maxn];
bool flg = true;
int cnt[1001];
bool desc(int a, int b) { return a > b; }

int main() {

	std::ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	int t;
	cin >> t;
	for (int test_case = 0; test_case < t; ++test_case) {
		vector<int>v;
		int n, k;

		cin >> n >> k;
		for (int i = 0; i < n-2; i++)
			arr[i] = 'a';
		v.push_back(n - 2);
		v.push_back(n - 2);
		flg = false;
		while (--k) {
			if (v[0]==v[1]) {
				v[0]--;
				v[1] = n - 2;
			}
			else {
				v[1]--;
			}
		}
		int num = 1;
		int i;
		v[0];
		for (i = 0; i < n - 2; i++) {
			if (v[0] == i) {
				cout << 'b';
			}
			if (v[1] == i)
				cout << 'b';
			cout << arr[i];

		}
		if (v[0] == i) {
			cout << 'b';
		}
		if (v[1] == i)
			cout << 'b';
		cout <<'\n';

	}

	return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>

typedef long long ll;
using namespace std;

char ar[104][104];
ll tc, baw, sam;
char mas;

int main() {
	cin >> tc;
	while (tc--) {
		cin >> baw >> sam;
		ll mam = sam * 2;
		ll hehe = sqrt(mam);
		if (hehe * (hehe + 1) / 2 < sam) {
			ll dis = sam - (hehe) * (hehe + 1) / 2;
			string s;
			for (int k = baw; k >= 1; k--) {
				if (k == dis || k == hehe+ 2) {
					cout << 'b';
				}
				else {
					cout << 'a';
				}

			}
			cout << '\n';
		}
		else if (hehe * (hehe + 1) / 2 == sam) {
			string s;
			for (int k = baw; k >= 1; k--) {
				if (k == hehe || k == hehe + 1) {
					cout << 'b';
				}
				else {
					cout << 'a';
				}

			}
			cout << '\n';
		}
		else {
			ll moi = sam - (hehe) * (hehe - 1) / 2;
			string s;
			for (int k = baw; k >= 1; k--) {
				if (k == moi || k == hehe + 1) {
					cout << 'b';
				}
				else {
					cout << 'a';
				}

			}
			cout << '\n';
		}
	}

}


#include <iostream>
#include <algorithm>
#include <vector>

typedef long long ll;
using namespace std;

char ar[104][104];
ll tc, baw, sam;
char mas;

int main() {
	cin >> tc;
	while (tc--) {
		cin >> baw >> sam;
		ll mam = sam * 2;
		ll hehe = sqrt(mam);
		if (hehe * (hehe + 1) / 2 < sam) {
			ll dis = sam - (hehe) * (hehe + 1) / 2;
			string s;
			for (int k = 1; k <= baw; k++) {
				if (k == dis || k == hehe+ 2) {
					s = s + 'b';
				}
				else {
					s = s + 'a';
				}

			}
			reverse(s.begin(), s.end());
			cout << s << '\n';
		}
		else if (hehe * (hehe + 1) / 2 == sam) {
			string s;
			for (int k = 1; k <= baw; k++) {
				if (k == hehe || k == hehe + 1) {
					s = s + 'b';
				}
				else {
					s = s + 'a';
				}
			}
			reverse(s.begin(), s.end());
			cout << s << '\n';
		}
		else {
			ll moi = sam - (hehe) * (hehe - 1) / 2;
			string s;
			for (int k = 1; k <= baw; k++) {
				if (k == moi || k == hehe+1) {
					s = s + 'b';
				}
				else {
					s = s + 'a';
				}

			}
			reverse(s.begin(), s.end());
			cout << s << '\n';
		}
	}

}


#include<iostream>
#include<algorithm>
#include<cmath>
#include<queue>
#include<unordered_map>
#include<string>
#include<map>
#include<string.h>
#define inf 2e9
using namespace std;
const int maxn = 1e5 + 5;
int n,k,t;
int main() {
	cin >> t;
	while (t--) {
		cin >> n >> k;
		int l = 0,d=0;
		for (int i = 1;i <= maxn;i++) {
			if (i*(i - 1) / 2 >= k) {
				l = i;
				d = i * (i - 1) / 2 - k;
				break;
			}
		}
		for (int i = 1;i <= n - l;i++) {
			cout << 'a';
		}
		cout << 'b';
		for (int i = 1;i <= d;i++) {
			cout << 'a';
		}
		cout << 'b';
		for (int i = 1;i <= l - d - 2;i++) {
			cout << 'a';
		}
		cout << endl;
	}
	return 0;
}


#include<iostream>
#include<algorithm>
#include<cmath>
#include<queue>
#include<unordered_map>
#include<string>
#include<map>
#include<string.h>
#define inf 2e9
using namespace std;
const int maxn = 1e5 + 5;

long long n,t;
long long k;
int main() {
	cin >> t;
	while (t--) {
		cin >> n >> k;
		long long l = 0,d=0;
		string ans;
		for (long long i = 1;i <= maxn;i++) {
		long long test = i*(i-1)/2;
			if (test>= k) {
				l = i;
				d = test - k;
				break;
			}
		}
		for (int i = 1;i <= n - l;i++) {
			ans += 'a';
		}
		ans += 'b';
		for (int i = 1;i <= d;i++) {
			ans += 'a';
		}
		ans += 'b';
		for (int i = 1;i <= l - d - 2;i++) {
			ans += 'a';
		}
		cout <<ans<< endl;
	}
	return 0;
}


#include<iostream>
#include<algorithm>
#include<cmath>
#include<queue>
#include<unordered_map>
#include<string>
#include<map>
#include<string.h>
#define inf 2e9
using namespace std;
const int maxn = 1e5 + 5;
int n,t;
long long k;
int main() {
	cin >> t;
	while (t--) {
		cin >> n >> k;
		int l = 0;
		long long d=0;
		for (int i = 1;i <= maxn;i++) {
		long long test = i*(i-1)/2;
			if (test>= k) {
				l = i;
				d =test- k;
				break;
			}
		}
		for (int i = 1;i <= n - l;i++) {
			cout << 'a';
		}
		cout << 'b';
		for (int i = 1;i <= d;i++) {
			cout << 'a';
		}
		cout << 'b';
		for (int i = 1;i <= l - d - 2;i++) {
			cout << 'a';
		}
		cout << endl;
	}
	return 0;
}


/*
───────────────────────────────────────
───▐▀▄───────▄▀▌───▄▄▄▄▄▄▄─────────────
───▌▒▒▀▄▄▄▄▄▀▒▒▐▄▀▀▒██▒██▒▀▀▄──────────
──▐▒▒▒▒▀▒▀▒▀▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▀▄────────
──▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▄▒▒▒▒▒▒▒▒▒▒▒▒▀▄──────
▀█▒▒▒█▌▒▒█▒▒▐█▒▒▒▀▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▌─────
▀▌▒▒▒▒▒▒▀▒▀▒▒▒▒▒▒▀▀▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐───▄▄
▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▌▄█▒█
▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█▒█▀─
▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█▀───
▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▌────
─▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐─────
─▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▌─────
──▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐──────
──▐▄▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▄▌──────
────▀▄▄▀▀▀▀▀▄▄▀▀▀▀▀▀▀▄▄▀▀▀▀▀▄▄▀────────
*/

#include <iostream>
#include <algorithm>
#include <list>
#include <iterator>
#include <string>
#include <fstream>
#include <cmath>
#include <iomanip>
#include <vector>
#include <map>
#include <array>
#include <set>

typedef long long ll;
typedef long double ld;
using namespace std;

int main()
{
	ll t;
	std::vector<ll> Z(50000);
	Z[0] = 1;
	for (ll i = 2; i <= 50000; ++i)
		Z[i - 1] = Z[i - 2] + i;
	std::cin >> t;
	while (t--) {
		ll a, b;
		std::cin >> a >> b;
		std::string A(a, 'a');
		ll ind = std::lower_bound(Z.begin(), Z.end(), b) - Z.begin();
		A[A.size() - ind - 2] = 'b';
		A[A.size() - 1 - ind + (Z[ind] - b)] = 'b';
		std::cout << A << '\n';
	}
}


/*
───────────────────────────────────────
───▐▀▄───────▄▀▌───▄▄▄▄▄▄▄─────────────
───▌▒▒▀▄▄▄▄▄▀▒▒▐▄▀▀▒██▒██▒▀▀▄──────────
──▐▒▒▒▒▀▒▀▒▀▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▀▄────────
──▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▄▒▒▒▒▒▒▒▒▒▒▒▒▀▄──────
▀█▒▒▒█▌▒▒█▒▒▐█▒▒▒▀▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▌─────
▀▌▒▒▒▒▒▒▀▒▀▒▒▒▒▒▒▀▀▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐───▄▄
▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▌▄█▒█
▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█▒█▀─
▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█▀───
▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▌────
─▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐─────
─▐▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▌─────
──▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▐──────
──▐▄▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▄▌──────
────▀▄▄▀▀▀▀▀▄▄▀▀▀▀▀▀▀▄▄▀▀▀▀▀▄▄▀────────
*/

#include <iostream>
#include <algorithm>
#include <list>
#include <iterator>
#include <string>
#include <fstream>
#include <cmath>
#include <iomanip>
#include <vector>
#include <map>
#include <array>
#include <set>

typedef long long ll;
typedef long double ld;
using namespace std;

int main()
{
	ll t;
	std::vector<ll> Z(70000);
	Z[0] = 1;
	for (ll i = 2; i <= 70000; ++i)
		Z[i - 1] = Z[i - 2] + i;
	std::cin >> t;
	while (t--) {
		ll a, b;
		std::cin >> a >> b;
		std::string A(a, 'a');
		ll ind = std::lower_bound(Z.begin(), Z.end(), b) - Z.begin();
		A[A.size() - ind - 2] = 'b';
		A[A.size() - 1 - ind + (Z[ind] - b)] = 'b';
		std::cout << A << '\n';
	}
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <vector>
#include<algorithm>
#include <iomanip>
#include <stack>
using namespace std;
int t, n, k, x, y, p;
string ss(100010, 'a');
int main()
{
	cin >> t;
	while (t--)
	{
		p = 1;
		cin >> n >> k;
		p = (int)pow(2 * k, 0.5);
		while (k > (p + 1)* p / 2)p++;
		y = k - p * (p - 1) / 2;
		y--;
		ss[n-1-y] = ss[n-1-p] = 'b';
		cout << ss.substr(0, n)<<endl;
		ss[n-1-y] = ss[n-1-p] = 'a';
	}
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <vector>
#include<algorithm>
#include <iomanip>
#include <stack>
using namespace std;
int t, n, k, x, y, p;
int main()
{
	cin >> t;
	while (t--)
	{
		p = 1;
		cin >> n >> k;
		while (k > (p + 1)* p / 2)p++;
		y = k - p * (p - 1) / 2;
		y--;
		for (int i = n-1; i >= 0; i--)
			if (i == y || i == p)
				printf("b");
			else
				printf("a");
		printf("\n");
	}
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <vector>
#include<algorithm>
#include <iomanip>
#include <stack>
using namespace std;
long long int t, n, k, x, y, p;
string ss(100010, 'a');
int main()
{
	cin >> t;
	while (t--)
	{
		p = 1;
		cin >> n >> k;
		p = (long long int)pow(2 * k, 0.5);
		while (k > (p + 1)* p / 2)p++;
		y = k - p * (p - 1) / 2;
		y--;
		ss[n-1-y] = ss[n-1-p] = 'b';
		cout << ss.substr(0, n)<<endl;
		ss[n-1-y] = ss[n-1-p] = 'a';
	}
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <vector>
#include<algorithm>
#include <iomanip>
#include <stack>
using namespace std;
int t, n, k, x, y, p;
int main()
{
	cin >> t;
	while (t--)
	{
		p = 1;
		cin >> n >> k;
		p = (int)pow(k, 0.5);
		while (k > (p + 1)* p / 2)p++;
		y = k - p * (p - 1) / 2;
		y--;
		for (int i = n-1; i >= 0; i--)
			if (i == y || i == p)
				printf("b");
			else
				printf("a");
		printf("\n");
	}
}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <vector>
#include<algorithm>
#include <iomanip>
#include <stack>
using namespace std;
int t, n, k, x, y, p;
int main()
{
	cin >> t;
	while (t--)
	{
		p = 1;
		cin >> n >> k;
		p = (int)pow(2 * k, 0.5);
		while (k > (p + 1)* p / 2)p++;
		y = k - p * (p - 1) / 2;
		y--;
		for (int i = n-1; i >= 0; i--)
			if (i == y || i == p)
				printf("b");
			else
				printf("a");
		printf("\n");
	}
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
#include <string>
#include <deque>
#include <tuple>
#define ll long long
using namespace std;

int calc(int num) {
	return ((num*(num - 1)) / 2 + 1);
}
int main() {
	int T;

	cin >> T;

	for (int t = 0; t < T; t++) {
		int n, k;
		cin >> n >> k;
		int first_b_pos = 2;
		int second_b_pos = 1;
		for (int i = n; i >= 2; i--) {
			int calc_var = calc(i);
			if (calc_var <= k) {
				first_b_pos = i + 1;
				second_b_pos = k - calc_var + 1;
				break;
			}
		}

		for (int i = n; i >= 1; i--) {
			if (i == first_b_pos || i == second_b_pos) {
				cout << 'b';
			}
			else {
				cout << 'a';
			}
		}
		cout << endl;
	}
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
#include <string>
#include <deque>
#include <tuple>
#define ll long long
using namespace std;

long long calc(long long num) {
	return ((num*(num - 1)) / 2 + 1);
}
int main() {
	int T;

	cin >> T;

	for (int t = 0; t < T; t++) {
		long long n, k;
		cin >> n >> k;
		long long first_b_pos = 2;
		long long second_b_pos = 1;
		for (int i = n; i >= 2; i--) {
			long long calc_var = calc(i);
			if (calc_var <= k) {
				first_b_pos = i + 1;
				second_b_pos = k - calc_var + 1;
				break;
			}
		}

		for (int i = n; i >= 1; i--) {
			if (i == first_b_pos || i == second_b_pos) {
				cout << 'b';
			}
			else {
				cout << 'a';
			}
		}
		cout << endl;
	}
}


#include <iostream>
using namespace std;

#define MyType int

int main()
{
	MyType t;
	cin >> t;

	while (t--)
	{
		MyType n, k;
		cin >> n >> k;

		MyType f = n - 2, s = n - 1;
		while (--k)
		{
			if ((s - 1) == f)
			{
				s = n - 1;
				f--;
				continue;
			}
			s--;
		}
		for (MyType i = 0; i < f; i++)
			cout << 'a';
		cout << 'b';
		for (MyType i = f + 1; i < s; i++)
			cout << 'a';
		cout << 'b';
		for (MyType i = s + 1; i < n; i++)
			cout << 'a';
	}

	return 0;
}


#include <iostream>
using namespace std;

#define MyType int

int main()
{
	MyType t;
	cin >> t;

	while (t--)
	{
		MyType n, k;
		cin >> n >> k;

		MyType f = n - 2, s = n - 1;
		while (--k)
		{
			if ((s - 1) == f)
			{
				s = n - 1;
				f--;
				continue;
			}
			s--;
		}
		for (MyType i = 0; i < f; i++)
			cout << 'a';
		cout << 'b';
		for (MyType i = f + 1; i < s; i++)
			cout << 'a';
		cout << 'b';
		for (MyType i = s + 1; i < n; i++)
			cout << 'a';
		cout << '\n';
	}

	return 0;
}


#include <iostream>
using namespace std;

#define MyType long long

int main()
{
	MyType t;
	cin >> t;

	MyType n, k, f, s;
	MyType temp;
	while (t--)
	{
		cin >> n >> k;

		f = n - 2;
		s = n - 1;
		k--;
		while (k > 0)
		{
			if ((s - 1) == f)
			{
				s = n - 1;
				f--;
				k--;
				continue;
			}
			temp = s - f - 1;
			if (k < temp)
			{
				s -= k;
				k = 0;
				continue;
			}
			s -= temp;
			k -= temp;
		}
		for (MyType i = 0; i < f; i++)
			cout << "a";
		cout << "b";
		for (MyType i = f + 1; i < s; i++)
			cout << "a";
		cout << "b";
		for (MyType i = s + 1; i < n; i++)
			cout << "a";
		cout << "\n";
	}
	return 0;
}


#include <iostream>
using namespace std;

#define MyType long long

int main()
{
	MyType t;
	cin >> t;

	MyType n, k, f, s;
	MyType temp;
	while (t--)
	{
		cin >> n >> k;

		f = n - 2;
		s = n - 1;
		k--;
		while (k > 0)
		{
			if ((s - 1) == f)
			{
				s = n - 1;
				f--;
				k--;
				continue;
			}
			temp = s - f - 1;
			if (k < temp)
			{
				s -= k;
				k = 0;
				continue;
			}
			s -= temp;
			k -= temp;
		}
		for (MyType i = 0; i < f; i++)
			cout << "a";
		cout << "b";
		for (MyType i = f + 1; i < s; i++)
			cout << "a";
		cout << "b";
		for (MyType i = s + 1; i < n; i++)
			cout << "a";
	}
	return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;

using NType = long long;

int main()
{
	NType t;
	cin >> t;
	NType n, k;

	while (t--)
	{
		cin >> n >> k;

		NType x = 0, remover = 0;
		x = (sqrt(1 + 8 * 1.0 * k) - 1) / 2;
		NType x1 = (x % 2 == 0) ? x / 2 : x;
		NType x2 = ((x + 1) % 2 == 0) ? (x + 1) / 2 : (x + 1);
		k -= x1 * x2;
		if (k > 0)
			x++;
		if (k == 0)
			k = x;

		k = x - k + 1;

		NType b1, b2;

		b1 = n - x;
		b2 = b1 + k;

		for (NType i = 1; i < b1; i++)
			cout << "a";

		cout << "b";
		for (NType i = b1 + 1; i < b2; i++)
			cout << "a";
		cout << "b";
		for (NType i = b2 + 1; i <= n; i++)
			cout << "a";
		cout << "\n";

	}

	return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;

using NType = long long;

int main()
{
	NType t;
	cin >> t;
	NType n, k;

	while (t--)
	{
		cin >> n >> k;

		NType x = 0, remover = 0;
		x = (sqrt(1 + 8 * 1.0 * k) - 1) / 2;
		NType x1 = (x % 2 == 0) ? x / 2 : x;
		NType x2 = ((x + 1) % 2 == 0) ? (x + 1) / 2 : (x + 1);
		k -= x1 * x2;
		if (k > 0)
			x++;
		if (k == 0)
			k = x;

		k = x - k + 1;

		NType b1, b2;

		b1 = n - x;
		b2 = b1 + k;

		for (NType i = 1; i < b1; i++)
			cout << "a";
		cout << "b";
		for (NType i = b1 + 1; i < b2; i++)
			cout << "a";
		cout << "b";
		for (NType i = b2 + 1; i <= n; i++)
			cout << "a";
		cout << "\n";

	}

	return 0;
}


#include <iostream>
using namespace std;

#define MyType int

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

	MyType t;
	cin >> t;

	while (t--)
	{
		MyType n, k;
		cin >> n >> k;

		MyType f = n - 2, s = n - 1;
		while (--k)
		{
			if ((s - 1) == f)
			{
				s = n - 1;
				f--;
				continue;
			}
			s--;
		}
		for (MyType i = 0; i < f; i++)
			cout << 'a';
		cout << 'b';
		for (MyType i = f + 1; i < s; i++)
			cout << 'a';
		cout << 'b';
		for (MyType i = s + 1; i < n; i++)
			cout << 'a';
		cout << '\n';
	}

	return 0;
}


#include <iostream>
using namespace std;

#define MyType long long

int main()
{
	MyType t;
	cin >> t;

	while (t--)
	{
		MyType n, k;
		cin >> n >> k;

		MyType f = n - 2, s = n - 1;
		while (--k)
		{
			if ((s - 1) == f)
			{
				s = n - 1;
				f--;
				continue;
			}
			s--;
		}
		for (MyType i = 0; i < f; i++)
			cout << 'a';
		cout << 'b';
		for (MyType i = f + 1; i < s; i++)
			cout << 'a';
		cout << 'b';
		for (MyType i = s + 1; i < n; i++)
			cout << 'a';
		cout << '\n';
	}

	return 0;
}


#include <iostream>
#include <vector>

using namespace std;

long long Search_Binary(long long n, long long key) {
	long long midd = 0;
	long long left = 1;
	long long right = n;
	while (1) {
		midd = (left + right) / 2;

		long long val = ((midd + 1) * midd) / 2;
		long long valR = ((midd + 2) * (midd + 1)) / 2;

		if (key >= val + 1 && key <= valR ) {
			return midd;
		}
		else if (key < val + 1) {
			right = midd - 1;
		}
		else if (key > valR)
			left = midd + 1;
		else {
			return -1;
		}
	}
	return -1;
}

int main() {
	int a, b;
	int temp, temp1, temp2;
	int t = 0;
	cin >> t;
	vector<int> nVec;
	vector<int> kVec;
	int f = 0; //number of first b
	int s = 0; //number of second b
	for (int i = 0; i < t; ++i) {
		cin >> temp1;
		cin >> temp2;
		nVec.push_back(temp1);
		kVec.push_back(temp2);
	}
	for (int i = 0; i < t; ++i) {
		f = Search_Binary(nVec[i] - 1, kVec[i]) + 2;

		int N = (f - 2) * (f - 1) / 2;
		s = kVec[i] - N;
		for (int j = nVec[i]; j > 0; --j) {
			if (j == f || j == s) {
				cout << "b";
			}
			else {
				cout << "a";
			}

		}
		cout << endl;

	}

	return 0;
}


#include <iostream>
#include <vector>

using namespace std;

long long Search_Binary(long long n, long long key) {
	long long midd = 0;
	long long left = 1;
	long long right = n;
	while (1) {
		midd = (left + right) / 2;

		long long val = ((midd + 1) * midd) / 2;
		long long valR = ((midd + 2) * (midd + 1)) / 2;

		if (key >= val + 1 && key <= valR ) {
			return midd;
		}
		else if (key < val + 1) {
			right = midd - 1;
		}
		else if (key > valR)
			left = midd + 1;
		else {
			return -1;
		}
	}
	return -1;
}

int main() {
	int a, b;
	int temp, temp1, temp2;
	int t = 0;
	cin >> t;
	vector<int> nVec; //length
	vector<int> kVec; //number
	long long f, s;
	for (int i = 0; i < t; ++i) {
		cin >> temp1;
		cin >> temp2;
		nVec.push_back(temp1);
		kVec.push_back(temp2);
	}
	for (int i = 0; i < t; ++i) {
		f = Search_Binary(nVec[i] - 1, kVec[i]) + 2;

		long long N = (f - 2) * (f - 1) / 2;

		s = kVec[i] - N;

		for (int j = nVec[i]; j > 0; --j) {
			if (j == f || j == s) {
				cout << "b";
			}
			else {
				cout << "a";
			}

		}
		cout << endl;

	}

	return 0;
}


#include <iostream>
#include <vector>

using namespace std;

int Search_Binary(int n, int key) {
	int midd = 0;
	int left = 1;
	int right = n;
	while (1) {
		midd = (left + right) / 2;

		int val = ((midd + 1) * midd) / 2;
		int valR = ((midd + 2) * (midd + 1)) / 2;

		if (key >= val + 1 && key <= valR ) {
			return midd;
		}
		else if (key < val + 1) {
			right = midd - 1;
		}
		else if (key > valR)
			left = midd + 1;
		else {
			return -1;
		}
	}
	return -1;
}

int main() {
	int a, b;
	int temp, temp1, temp2;
	int t = 0;
	cin >> t;
	vector<int> nVec;
	vector<int> kVec;
	int f = 0; //number of first b
	int s = 0; //number of second b
	for (int i = 0; i < t; ++i) {
		cin >> temp1;
		cin >> temp2;
		nVec.push_back(temp1);
		kVec.push_back(temp2);
	}
	for (int i = 0; i < t; ++i) {
		f = Search_Binary(nVec[i] - 1, kVec[i]) + 2;
		int N = (f - 2) * (f - 1) / 2;
		s = kVec[i] - N;
		for (int j = nVec[i]; j > 0; --j) {
			if (j == f || j == s) {
				cout << "b";
			}
			else {
				cout << "a";
			}

		}
		cout << endl;

	}

	return 0;
}


#include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
using namespace std;
int flag[1000000];
int main()
{
	int t,n,k;
	cin>>t;
	while(t--)
	{
		memset(flag,0,sizeof(flag));
		cin>>n>>k;
		int cnt=0;
		for(int i=1;i<=n;i++)
		{
			int j=i-1;
			int jj=(1+j)*j/2;
			int ii=(1+i)*i/2;
			if(k>jj&&k<=ii)
			{
				flag[n-i]=1;
				cnt=jj;
				break;
			}
		}
		for(int i=1;i<=n;i++)
		{
			if(flag[i]==1||i==n-k+cnt+1) cout<<"b";
			else cout<<"a";
		}
		cout<<endl;
	}
	return 0;
}


#include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#define ll int
using namespace std;
ll flag[1000000];
int main()
{
	ll t,n,k;
	cin>>t;
	while(t--)
	{
		memset(flag,0,sizeof(flag));
		cin>>n>>k;
		ll cnt=0;
		for(ll i=1;i<=n;i++)
		{
			ll j=i-1;
			ll jj=(1+j)*j/2;
			ll ii=(1+i)*i/2;
			if(k>jj&&k<=ii)
			{
				flag[n-i]=1;
				cnt=jj;
				break;
			}
		}
		for(ll i=1;i<=n;i++)
		{
			if(flag[i]==1||i==n-k+cnt+1) cout<<"b";
			else cout<<"a";
		}
		cout<<endl;
	}
	return 0;
}


#include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#define ll int
using namespace std;
ll flag[100000000];
int main()
{
	ll t,n,k;
	cin>>t;
	while(t--)
	{
		memset(flag,0,sizeof(flag));
		cin>>n>>k;
		ll cnt=0;
		for(ll i=1;i<=n;i++)
		{
			ll j=i-1;
			ll jj=(1+j)*j/2;
			ll ii=(1+i)*i/2;
			if(k>jj&&k<=ii)
			{
				flag[n-i]=1;
				cnt=jj;
				break;
			}
		}
		for(ll i=1;i<=n;i++)
		{
			if(flag[i]==1||i==n-k+cnt+1) cout<<"b";
			else cout<<"a";
		}
		cout<<endl;
	}
	return 0;
}


#include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#define ll int
using namespace std;
ll flag[1000000];
int d[1000000];
int main()
{
	ll t,n,k;
	cin>>t;
	while(t--)
	{
		memset(flag,0,sizeof(flag));
		cin>>n>>k;
		int sum=0;
		int ti=k;
		while(ti>0)
		{
			sum++;
			ti-=sum;
		}
//		cout<<sum<<endl;
		int s=(sum-1)*sum/2;
	//	cout<<s<<endl;
		for(ll i=1;i<=n;i++)
		{
			if(i==n-sum||i==n-k+s+1) cout<<"b";
			else cout<<"a";
		}
		cout<<endl;
	}
	return 0;
}


#include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#define ll int
using namespace std;
ll flag[1000000];
int d[1000000];
int main()
{
	ll t,n,k;
	cin>>t;
	while(t--)
	{
	//	memset(flag,0,sizeof(flag));
		cin>>n>>k;
		int sum=0;
		int ti=k;
		while(ti>sum)
		{
			ti-=sum;
			sum++;
		}
	//	cout<<sum<<endl;
	//	cout<<s<<endl;
		for(ll i=1;i<=n;i++)
		{
			if(i==n-sum||i==n-ti+1) cout<<"b";
			else cout<<"a";
		}
		cout<<endl;
	}
	return 0;
}


#include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#define ll long long
using namespace std;
ll flag[1000000];
int d[1000000];
int main()
{
	ll t,n,k;
	cin>>t;
	while(t--)
	{
	//	memset(flag,0,sizeof(flag));
		cin>>n>>k;
		int sum=0;
		int ti=k;
		while(ti>0)
		{
			sum++;
			ti-=sum;
		}
	//	cout<<sum<<endl;
		int s=(sum-1)*sum/2;
	//	cout<<s<<endl;
		for(ll i=1;i<=n;i++)
		{
			if(i==n-sum||i==n-k+s+1) cout<<"b";
			else cout<<"a";
		}
		cout<<endl;
	}
	return 0;
}


#include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#define ll int
using namespace std;
ll flag[1000000];
int d[1000000];
int main()
{
	ll t,n,k;
	cin>>t;
	while(t--)
	{
	//	memset(flag,0,sizeof(flag));
		cin>>n>>k;
		int sum=0;
		int ti=k;
		while(ti>0)
		{
			sum++;
			ti-=sum;
		}
	//	cout<<sum<<endl;
		int s=(sum-1)*sum/2;
	//	cout<<s<<endl;
		for(ll i=1;i<=n;i++)
		{
			if(i==n-sum||i==n-k+s+1) cout<<"b";
			else cout<<"a";
		}
		cout<<endl;
	}
	return 0;
}


#include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#define ll int
using namespace std;
ll flag[1000000];
int d[1000000];
int main()
{
	ll t,n,k;
	cin>>t;
	while(t--)
	{
	//	memset(flag,0,sizeof(flag));
		cin>>n>>k;
		int sum=0;
		int ti=k;
		while(ti>sum)
		{
			ti-=sum;
			sum++;
		}
	//	cout<<sum<<endl;
		int s=(sum-1)*sum/2;
	//	cout<<s<<endl;
		for(ll i=1;i<=n;i++)
		{
			if(i==n-sum||i==n-ti+s+1) cout<<"b";
			else cout<<"a";
		}
		cout<<endl;
	}
	return 0;
}
//放我过吧，跪求


#include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#define ll int
using namespace std;
ll flag[100000000];
int d[100000000];
int main()
{
	ll t,n,k;
	cin>>t;
	while(t--)
	{
		memset(flag,0,sizeof(flag));
		cin>>n>>k;
		int x=1,tt=0;
		for(int i=1;i<=k;i++)
		{
			d[i]=x;
			tt++;
			if(tt==x)
			{
				x++;
				tt=0;
			}
		}
//		cout<<d[k]<<endl;
		int s=(d[k]-1)*(d[k])/2;
	//	cout<<s<<endl;
		for(ll i=1;i<=n;i++)
		{
			if(i==n-d[k]||i==n-k+s+1) cout<<"b";
			else cout<<"a";
		}
		cout<<endl;
	}
	return 0;
}


#include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#define ll long long
using namespace std;
ll flag[1000000];
int main()
{
	ll t,n,k;
	cin>>t;
	while(t--)
	{
		memset(flag,0,sizeof(flag));
		cin>>n>>k;
		ll cnt=0;
		for(ll i=1;i<=n;i++)
		{
			ll j=i-1;
			ll jj=(1+j)*j/2;
			ll ii=(1+i)*i/2;
			if(k>jj&&k<=ii)
			{
				flag[n-i]=1;
				cnt=jj;
				break;
			}
		}
		for(ll i=1;i<=n;i++)
		{
			if(flag[i]==1||i==n-k+cnt+1) cout<<"b";
			else cout<<"a";
		}
		cout<<endl;
	}
	return 0;
}


#include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#define ll int
using namespace std;
ll flag[1000000];
int d[1000000];
int main()
{
	ll t,n,k;
	cin>>t;
	while(t--)
	{
	//	memset(flag,0,sizeof(flag));
		cin>>n>>k;
		int sum=0;
		int ti=k;
		while(ti>0&&sum<=n)
		{
			sum++;
			ti-=sum;
		}
	//	cout<<sum<<endl;
		int s=(sum-1)*sum/2;
	//	cout<<s<<endl;
		for(ll i=1;i<=n;i++)
		{
			if(i==n-sum||i==n-k+s+1) cout<<"b";
			else cout<<"a";
		}
		cout<<endl;
	}
	return 0;
}


#include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#define ll long long
using namespace std;
ll flag[1000000];
int d[1000000];
int main()
{
	ll t,n,k;
	cin>>t;
	while(t--)
	{
		memset(flag,0,sizeof(flag));
		cin>>n>>k;
		int sum=0;
		int ti=k;
		while(ti>0)
		{
			sum++;
			ti-=sum;
		}
//		cout<<sum<<endl;
		int s=(sum-1)*sum/2;
	//	cout<<s<<endl;
		for(ll i=1;i<=n;i++)
		{
			if(i==n-sum||i==n-k+s+1) cout<<"b";
			else cout<<"a";
		}
		cout<<endl;
	}
	return 0;
}


#include<cstdio>
#include<algorithm>
#include<iostream>
#include<string>
using namespace std;
int main()
{
    int m,n,t,k;
    cin >> t;
    while(t--)
	{
        cin>>n>>k;
        int i=0;
        for (i=1;i<n;i++)
		{
            if(k<=i)
            break;
            k-=i;
        }
        i=n-i;
        k=n-k+1;
        for(int j=1;j<=n;j++)
		{
            if(j==i||j==k)
                cout<<"b";
            else
            cout<<"a";
        }
        cout<<endl;
    }
    return 0;
}


#include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#define ll int
using namespace std;
ll flag[1000000];
int d[1000000];
int main()
{
	ll t,n,k;
	cin>>t;
	while(t--)
	{
		memset(flag,0,sizeof(flag));
		cin>>n>>k;
		int x=1,tt=0;
		for(int i=1;i<=k;i++)
		{
			d[i]=x;
			tt++;
			if(tt==x)
			{
				x++;
				tt=0;
			}
		}
//		cout<<d[k]<<endl;
		int s=(d[k]-1)*(d[k])/2;
	//	cout<<s<<endl;
		for(ll i=1;i<=n;i++)
		{
			if(i==n-d[k]||i==n-k+s+1) cout<<"b";
			else cout<<"a";
		}
		cout<<endl;
	}
	return 0;
}


#include<iostream>
using namespace std;
typedef long long ll;
main()
{
    ll t;
    cin>>t;
    while(t--)
    {
        ll n,k;
        cin>>n>>k;
      //  int t=(n*(n-1))/2;
        ll i=1;
        while((i*(i+1)/2<k))
        {
        i++;
        }
        ll larg=(i*(i+1))/2;
        ll small=i-(larg-k)-1;
        i++;small++;
        for(ll j=n;j>0;j--)
            {
                if(j==i||j==small)
                    cout<<'b';
                else
                    cout<<'a';
            }
            cout<<endl;
    }

}


#include<iostream>
using namespace std;
typedef long long ll;
main()
{
    ll t;
    cin>>t;
    while(t--)
    {
        ll n,k;
        cin>>n>>k;
      //  int t=(n*(n-1))/2;
        int i=1;
        while((i*(i+1)/2<k))
        {
        i++;
        }
        int larg=(i*(i+1))/2;
        int small=i-(larg-k)-1;
        i++;small++;
        for(int j=n;j>0;j--)
            {
                if(j==i||j==small)
                    cout<<'b';
                else
                    cout<<'a';
            }
            cout<<endl;
    }

}


#include<iostream>
using namespace std;
typedef int ll;
main()
{
    ll t;
    cin>>t;
    while(t--)
    {
        ll n,k;
        cin>>n>>k;
      //  int t=(n*(n-1))/2;
        ll i=1;
        while((i*(i+1)/2<k))
        {
        i++;
        }
        ll larg=(i*(i+1))/2;
        ll small=i-(larg-k)-1;
        i++;small++;
        for(ll j=n;j>0;j--)
            {
                if(j==i||j==small)
                    cout<<'b';
                else
                    cout<<'a';
            }
            cout<<endl;
    }

}


#include<iostream>
using namespace std;
typedef long long ll;
int main()
{
    ll t;
    cin>>t;
    while(t--)
    {
        ll n,k;
        cin>>n>>k;
      //  int t=(n*(n-1))/2;
        ll i=1;
        while((i*(i+1)/2<k))
        {
        i++;
        }
        ll larg=(i*(i+1))/2;
        ll small=i-(larg-k)-1;
        i++;small++;
        for(ll j=n;j>0;j--)
            {
                if(j==i||j==small)
                    cout<<'b';
                else
                    cout<<'a';
            }
            cout<<endl;
    }

}


#include<iostream>
using namespace std;
typedef long long ll;
main()
{
    ll t;
    cin>>t;
    while(t--)
    {
        ll n,k;
        cin>>n>>k;
        int t=(n*(n-1))/2;
        int i=1;
        while((i*(i+1)/2<k))
        {
        i++;
        }
        int larg=(i*(i+1))/2;
        int small=i-(larg-k)-1;
        i++;small++;
        for(int j=n;j>0;j--)
            {
                if(j==i||j==small)
                    cout<<'b';
                else
                    cout<<'a';
            }
            cout<<endl;
    }

}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
main()
{
    ll t;
    cin>>t;
    while(t--)
    {
        ll n,k;
        cin>>n>>k;
        int t=(n*(n-1))/2;
        int i=1;
        while((i*(i+1)/2<k))
        {
        i++;
        }
        int larg=(i*(i+1))/2;
        int small=i-(larg-k)-1;
        i++;small++;
        for(int j=n;j>0;j--)
            {
                if(j==i||j==small)
                    cout<<'b';
                else
                    cout<<'a';
            }
            cout<<endl;
    }

}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
main()
{
    ll t;
    cin>>t;
    while(t--)
    {
        ll n,k;
        cin>>n>>k;
       // int t=(n*(n-1))/2;
        int i=1;
        while((i*(i+1)/2<k))
        {
        i++;
        }
        int larg=(i*(i+1))/2;
        int small=i-(larg-k)-1;
        i++;small++;
        for(int j=n;j>0;j--)
            {
                if(j==i||j==small)
                    cout<<'b';
                else
                    cout<<'a';
            }
            cout<<endl;
    }

}


#include <iostream>
#include <fstream>
#include <vector>
#include <cmath>
#include <vector>
#include <string>
#include <cstring>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <algorithm>
#include <bitset>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define FASTIO ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define loop(i, len) for (long long i = 0; i < len; ++i)
#define LOCAL 0

bool vis[100001];
bool v[100001];
int arr[100001];

int main()
{
	int t;

	cin >> t;
	while (t--)
	{
		ll a, b;
		cin >> a >> b;
		string x;
		x.resize(a);
		double discriminant = 1- (4 * 1*-2*b);
		double x1 = (1 + sqrt(discriminant))/2 ;

		double x2 =( 1 - sqrt(discriminant))/2;
		double z = (x1 > x2) ? x1 : x2;
		ll d = (ll(z) == z) ? z : z + 1;
		loop(i, a)
		{
			x.at(i) = 'a';
		}
		x.at(a-(d)) = 'b';
		d -= 1;
		x.at(a-(b -(d*(d - 1)/ 2))) = 'b';
		cout << x << endl;

	}

}


#include <iostream>
#include <fstream>
#include <vector>
#include <cmath>
#include <vector>
#include <string>
#include <cstring>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <algorithm>
#include <bitset>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define FASTIO ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define loop(i, len) for (long long i = 0; i < len; ++i)
#define LOCAL 0

bool vis[100001];
bool v[100001];
int arr[100001];

int main()
{
	int t;

	cin >> t;
	while (t--)
	{
		ll a, b;
		cin >> a >> b;
		string x;
		x.resize(a);
		float discriminant = 1- (4 * 1*-2*b);
		float x1 = (1 + sqrt(discriminant))/2 ;

		float x2 =( 1 - sqrt(discriminant))/2;
		float z = (x1 > x2) ? x1 : x2;
		int d = (int(z) == z) ? z : z + 1;
		loop(i, a)
		{
			x.at(i) = 'a';
		}
		x.at(a-(d)) = 'b';
		d -= 1;
		x.at(a-(b -(d*(d - 1)/ 2))) = 'b';
		cout << x << endl;

	}

}


#include <iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<set>

using namespace std;
void solve()
{
	long long n, k;
	string x;
	cin >> n >> k; long long b;
	long long m = n;
	for (int i = 0; i < m; ++i)
	{
		long long b = n * (n - 1) / 2 - (n - 1);
		n--;
		if (k <= b)
		{
			x.push_back('a');
		}
		else
		{
			x.push_back('b');
			k = k - b;
			for (int i = 0; i < n; --n)
			{
				if (n == k)
				{
					x.push_back('b');
				}
				else
				{
					x.push_back('a');
				}
			}
			cout << x << endl;
			return;
		}
	}
}

int main()
{
	int t;
	cin >> t;
	for (int i = 0; i < t; ++i)
	{
		solve();
	}
}


#include <iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<set>

using namespace std;
void solve()
{
	int n, k;
	string x;
	cin >> n >> k; int b;
	int m = n;
	for (int i = 0; i < m; ++i)
	{
		int b = n * (n - 1) / 2 - (n - 1);
		n--;
		if (k <= b)
		{
			x.push_back('a');
		}
		else
		{
			x.push_back('b');
			k = k - b;
			for (int i = 0; i < n; --n)
			{
				if (n == k)
				{
					x.push_back('b');
				}
				else
				{
					x.push_back('a');
				}
			}
			cout << x << endl;
			return;
		}
	}
}

int main()
{
	int t;
	cin >> t;
	for (int i = 0; i < t; ++i)
	{
		solve();
	}
}


#include <iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<set>

using namespace std;
void solve()
{
	int n, k;
	string x;
	cin >> n >> k; int b;
	for (int i = 0; i < n; ++i)
	{
		int b = n * (n - 1) / 2 - (n + 1);
		n--;
		if (k <= b)
		{
			x.push_back('a');
		}
		else
		{
			x.push_back('b');
			for (int i = 0; i < n; ++i)
			{
				k = k - b;
				if (i == b - k)
				{
					x.push_back('b');
				}
				else
				{
					x.push_back('a');
				}
			}
			cout << x << endl;
			return;
		}
	}
}

int main()
{
	int t;
	cin >> t;
	for (int i = 0; i < t; ++i)
	{
		solve();
	}
}


#include<cstdio>
#include<string>
#include<iostream>
using namespace std;
int main()
{
	int k,n,pos,i,j=1;
    scanf("%d",&k);
	for (i=1;i<=k;i++)
	{
	  scanf("%d%d",&n,&pos);
	  string s(n,'a');
	  while(j*(j-1)<2*pos)
	  	j++;
	   s[n-j]='b';
	   int m=n-(pos-(j-1)*(j-2)/2);
	   s[m]='b';
	   j=1;
	  cout<<s;
	}
}


#include<cstdio>
#include<string>
#include<iostream>
using namespace std;
int main()
{
	int k,n,pos,i,j=1;
    scanf("%d",&k);
	for (i=1;i<=k;i++)
	{
	  scanf("%d%d",&n,&pos);
	  string s(n,'a');
	  while(j*(j-1)<2*pos)
	  	j++;
	   s[n-j]='b';
	   int m=n-(pos-(j-1)*(j-2)/2);
	   s[m]='b';
	   j=1;
	  cout<<s<<endl;
	}
}


#include<cstdio>
#include<string>
#include<iostream>
using namespace std;
int main()
{
	long long k,n,pos,i,j=1;
    scanf("%lld",&k);
	for (i=1;i<=k;i++)
	{
	  scanf("%lld%lld",&n,&pos);
	  string s(n,'a');
	  while(j*(j-1)<2*pos)
	  	j++;
	   s[n-j]='b';
	   int m=n-(pos-(j-1)*(j-2)/2);
	   s[m]='b';
	   j=1;
	  cout<<s<<endl;
	}
}


#include<iostream>
using namespace std;

int main(){

	int a, b, n, t, k, i;
	cin >> t;
	while (t--){
		cin >> n >> k;
		for (i = 1; i < n; i++){
			if (k <= i)
				break;
			k -= i;
		}
		a = n - i;
		b = n - k + 1;

		for (i = 1; i <= n; i++){
			if (i == a || i == b)
				cout << 'b';
			else
				cout << 'a';

		}
		cout << endl;
	}

	return 0;
}


#include<iostream>
using namespace std;

int main(){

	int a, b, n, t, k, i;
	cin >> t;
	while (t--){
		cin >> n >> k;
		for (i = 1; i < n; i++){
			if (i <= k)
				break;
			k -= i;
		}
		a = n - i;
		b = n - k + 1;

		for (i = 1; i <= n; i++){
			if (i == a || i == b)
				cout << 'b';
			else
				cout << 'a';

		}
		cout << endl;
	}

	return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <sstream>
#include <stdio.h>
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <map>
#include <set>
#include <ctype.h>
#define sz(a) (int)a.size()

using namespace std;

typedef long long int ill;
typedef unsigned long long int ull;

int bst(vector<ill>a, int f, int l, int g)
{
	int mid = (f + l) / 2;
	if (a[mid] <= g && a[mid + 1] >= g)
		return mid;
	if (a[mid] > g)
		return bst(a, f, mid - 1, g);
	return bst(a, mid + 1, l, g);
}

int main()
{
	vector<ill>p(1, 1);

	int idx = 0;
	for (int i = 2; i <= 100005; i++)
	{
		p.push_back(p[idx++] + i);
	}

	int t;
	cin >> t;
	while (t--)
	{
		int a, b;
		cin >> a >> b;
		int find = bst(p, 0, 100004, b);
		string re(a, 'a');
		a--;
		if (p[find] == b)
		{
			re[a - find - 1] = 'b';
			re[a - find] = 'b';
		}
		else
		{
			re[a - find - 2]='b';
			int rem = b - p[find];
			rem--;
			re[a - rem ] = 'b';

		}

		cout << re << endl;
	}
}


#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <sstream>
#include <stdio.h>
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <map>
#include <set>
#include <ctype.h>
#define sz(a) (int)a.size()

using namespace std;

typedef long long int ill;
typedef unsigned long long int ull;

int main()
{

	int t;
	cin >> t;
	while (t--)
	{
		int a, b;
		cin >> a >> b;
		int cnt = 1;
		int f = 1;
		bool y = 0;

		while (f <= b)
		{
			if (f == b)
			{
				y = 1;
				break;
			}
			f += ++cnt;
		}

		string re(a, 'a');

		if (y)
		{
			re[a - cnt - 1] = 'b';
			re[a - cnt] = 'b';
		}
		else
		{
			f -= (cnt);
			re[a - cnt - 1] = 'b';
			int rem = b - f - 1;
			re[a - rem - 1 ] = 'b';
		}

		cout << re << endl;
	}
}


#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <sstream>
#include <stdio.h>
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <map>
#include <set>
#include <ctype.h>
#define sz(a) (int)a.size()

using namespace std;

typedef long long int ill;
typedef unsigned long long int ull;

int bst(vector<int>a, int f, int l, int g)
{
	int mid = (f + l) / 2;
	if (a[mid] <= g && a[mid + 1] >= g)
		return mid;
	if (a[mid] > g)
		return bst(a, f, mid - 1, g);
	return bst(a, mid + 1, l, g);
}

int main()
{
	vector<int>p(1, 1);

	int idx = 0;
	for (int i = 2; i <= 1005; i++)
	{
		p.push_back(p[idx++] + i);
	}

	int t;
	cin >> t;
	while (t--)
	{
		int a, b;
		cin >> a >> b;
		int find = bst(p, 0, 1004, b);
		string re(a, 'a');
		a--;
		if (p[find] == b)
		{
			re[a - find - 1] = 'b';
			re[a - find] = 'b';
		}
		else
		{
			re[a - find - 2]='b';
			int rem = b - p[find];
			rem--;
			re[a - rem ] = 'b';

		}

		cout << re << endl;
	}
}


#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <sstream>
#include <stdio.h>
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <map>
#include <set>
#include <ctype.h>
#define sz(a) (int)a.size()

using namespace std;

typedef long long int ill;
typedef unsigned long long int ull;

int bst(vector<ill>a, int f, int l, int g)
{
	int mid = (f + l) / 2;
	if (a[mid] <= g && a[mid + 1] >= g)
		return mid;
	if (a[mid] > g)
		return bst(a, f, mid - 1, g);
	return bst(a, mid + 1, l, g);
}

int main()
{
	vector<ill>p(1, 1);

	int idx = 0;
	for (int i = 2; i <= 10005; i++)
	{
		p.push_back(p[idx++] + i);
	}

	int t;
	cin >> t;
	while (t--)
	{
		int a, b;
		cin >> a >> b;
		int find = bst(p, 0, 10004, b);
		string re(a, 'a');
		a--;
		if (p[find] == b)
		{
			re[a - find - 1] = 'b';
			re[a - find] = 'b';
		}
		else
		{
			re[a - find - 2]='b';
			int rem = b - p[find];
			rem--;
			re[a - rem ] = 'b';

		}

		cout << re << endl;
	}
}


#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <sstream>
#include <stdio.h>
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <map>
#include <set>
#include <ctype.h>
#define sz(a) (int)a.size()

using namespace std;

typedef long long int ill;
typedef unsigned long long int ull;

int bst(vector<ill>a, int f, int l, int g)
{
	int mid = (f + l) / 2;
	if (a[mid] <= g && a[mid + 1] >= g)
		return mid;
	if (a[mid] > g)
		return bst(a, f, mid - 1, g);
	return bst(a, mid + 1, l, g);
}

int main()
{
	vector<ill>p(1, 1);

	int idx = 0;
	for (int i = 2; i <= 10001; i++)
	{
		p.push_back(p[idx++] + i);
	}
	int t;
	cin >> t;
	while (t--)
	{
		int a, b;
		cin >> a >> b;
		int find = bst(p, 0, 10000, b);
		string re(a, 'a');
		a--;
		if (p[find] == b)
		{
			re[a - find - 1] = 'b';
			re[a - find] = 'b';
		}
		else
		{
			re[a - find - 2]='b';
			int rem = b - p[find];
			rem--;
			re[a - rem ] = 'b';

		}

		cout << re << endl;
	}
}


#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <sstream>
#include <stdio.h>
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <map>
#include <set>
#include <ctype.h>
#define sz(a) (int)a.size()

using namespace std;

typedef long long int ill;
typedef unsigned long long int ull;

int bst(vector<ill>a, int f, int l, int g)
{
	int mid = (f + l) / 2;
	if (a[mid] <= g && a[mid + 1] >= g)
		return mid;
	if (a[mid] > g)
		return bst(a, f, mid - 1, g);
	return bst(a, mid + 1, l, g);
}

int main()
{
	vector<ill>p(1, 1);

	int idx = 0;
	for (int i = 2; i <= 100001; i++)
	{
		p.push_back(p[idx++] + i);
	}
	int t;
	cin >> t;
	while (t--)
	{
		int a, b;
		cin >> a >> b;
		int find = bst(p, 0, 100000, b);
		string re(a, 'a');
		a--;
		if (p[find] == b)
		{
			re[a - find - 1] = 'b';
			re[a - find] = 'b';
		}
		else
		{
			re[a - find - 2]='b';
			int rem = b - p[find];
			rem--;
			re[a - rem ] = 'b';

		}

		cout << re << endl;
	}
}