#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <queue>
#include <unordered_set>
#include <algorithm>
using namespace std;
#define x first
#define y second

typedef long long ll;
const int MAXN = 200005;
pair<ll, int> a[MAXN];
int ainv[MAXN];
ll ls[MAXN], rs[MAXN];
int n, m;

int bcomp(const ll &l, const ll &r)
{
	return l > r;
}

int main()
{
	ios::sync_with_stdio(false);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	cin >> n >> m;
	for (int i = 0; i < n; i++)
	{
		scanf("%d", &a[i].x);
		a[i].y = i + 1;
	}
	sort(a, a + n);
	for (int i = 0; i < n; i++)
		ainv[a[i].y] = i;
	for (int i = 1; i < n; i++)
		ls[i] = a[i].x-a[0].x;
	for (int i = n - 2; 0 <= i; i--)
		rs[i] = a[n-1].x - a[i].x;
	//reverse(rs, rs + n);

	for (int i = 0; i < m; i++)
	{
		int pos, l;
		scanf("%d%d", &pos, &l);
		pos = ainv[pos];
		int prevpos = -1;
		bool rmove = (pos!=n-1);
		int low		= 0;
		int	high	= n;

		while (prevpos != pos)
		{
			prevpos = pos;
			if (rmove)
			{
				ll lsv = ls[pos] + (ll)l;
				pos = upper_bound(ls+low, ls + high, lsv) - ls - 1;
				high = pos + 1;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			else
			{
				ll rsv = rs[pos] + (ll)l;
				pos = lower_bound(rs+low, rs+high, rsv, bcomp) - rs;
				low = pos;
				l = l - abs(rs[pos] - rs[prevpos]);
			}
			rmove = !rmove;

			int diff = ls[high-1] - ls[low];
			if (diff == 0)
				continue;
			int d = l / diff;
			if (d > 0)
			{
				l = l % diff;
				if (d & 1)
				{
					if (pos + 1 == high)
					{
						pos = low;
						rmove = true;
					}
					else
					{
						pos = high-1;
						rmove = false;
					}
				};
				prevpos = -1;
			}

		}
		cout << a[pos].y << endl;
	}

}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <queue>
#include <unordered_set>
#include <algorithm>
using namespace std;
#define x first
#define y second

typedef long long ll;
const int MAXN = 200005;
pair<int, int> a[MAXN];
int ainv[MAXN];
ll ls[MAXN], rs[MAXN];
int n, m;

int bcomp(const ll &l, const ll &r)
{
	return l > r;
}

int main()
{
	ios::sync_with_stdio(false);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	cin >> n >> m;
	for (int i = 0; i < n; i++)
	{
		scanf("%d", &a[i].x);
		a[i].y = i + 1;
	}
	sort(a, a + n);
	for (int i = 0; i < n; i++)
		ainv[a[i].y] = i;
	for (int i = 1; i < n; i++)
		ls[i] = a[i].x - a[0].x;
	for (int i = n - 2; 0 <= i; i--)
		rs[i] = a[n - 1].x - a[i].x;
	//reverse(rs, rs + n);

	for (int i = 0; i < m; i++)
	{
		int pos, l;
		scanf("%d%d", &pos, &l);
		pos = ainv[pos];
		int prevpos = -1;
		bool rmove = (pos != n - 1);
		int low = 0;
		int	high = n;

		while (prevpos != pos)
		{
			prevpos = pos;
			if (rmove)
			{
				int lsv = ls[pos] + l;
				pos = upper_bound(ls + low, ls + high, lsv) - ls - 1;
				high = pos + 1;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			else
			{
				int rsv = rs[pos] + l;
				pos = lower_bound(rs + low, rs + high, rsv, bcomp) - rs;
				low = pos;
				l = l - abs(rs[pos] - rs[prevpos]);
			}
			rmove = !rmove;

			int diff = ls[high - 1] - ls[low];
			if (diff == 0)
				continue;
			int d = l / diff;
			if (d > 0)
			{
				l = l % diff;
				if (d & 1)
				{
					if (pos + 1 == high)
					{
						pos = low;
						rmove = true;
					}
					else
					{
						pos = high - 1;
						rmove = false;
					}
				};
				prevpos = -1;
			}

		}
		cout << a[pos].y << endl;
	}

}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <queue>
#include <unordered_set>
#include <algorithm>
using namespace std;
#define x first
#define y second

typedef long long ll;
const ll MAXN = 200005;
pair<ll, ll> a[MAXN];
ll ainv[MAXN];
ll ls[MAXN], rs[MAXN];
ll n, m;

ll bcomp(const ll &l, const ll &r)
{
	return l > r;
}

int main()
{
	ios::sync_with_stdio(false);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	cin >> n >> m;
	for (ll i = 0; i < n; i++)
	{
		cin >> a[i].x;
		a[i].y = i + 1;
	}

	sort(a, a + n);
	for (ll i = 0; i < n; i++)
		ainv[a[i].y] = i;
	for (ll i = 1; i < n; i++)
		ls[i] = a[i].x - a[0].x;
	for (ll i = n - 2; 0 <= i; i--)
		rs[i] = a[n - 1].x - a[i].x;

	for (ll i = 0; i < m; i++)
	{
		ll pos, l;
		cin >> pos >> l;
		pos = ainv[pos];
		ll prevpos = -1;
		bool rmove = true;
		ll low = 0;
		ll	high = n;

		while (low+1!=high)
		{
			prevpos = pos;
			if (rmove)
			{
				ll lsv = ls[pos] + l;
				pos = upper_bound(ls + low, ls + high, lsv) - ls - 1;
				high = pos + 1;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			else
			{
				ll rsv = rs[pos] + l;
				pos = lower_bound(rs + low, rs + high, rsv, bcomp) - rs;
				low = pos;
				l = l - abs(rs[pos] - rs[prevpos]);
			}
			rmove = !rmove;

			ll diff = ls[high - 1] - ls[low];
			if (diff == 0)
				continue;
			ll d = l / diff;
			if (d > 0)
			{
				l = l % diff;
				if (d%2LL==1LL)
				{
					if (pos + 1 == high)
					{
						pos = low;
						rmove = true;
					}
					else
					{
						pos = high - 1;
						rmove = false;
					}
				};
				prevpos = -1;
			}

		}
		cout << a[pos].y << endl;
	}

}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <queue>
#include <unordered_set>
#include <algorithm>
using namespace std;
#define x first
#define y second

typedef long long ll;
const int MAXN = 200005;
pair<int, int> a[MAXN];
int ainv[MAXN];
int ls[MAXN], rs[MAXN];
int n, m;

int main()
{
	ios::sync_with_stdio(false);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	cin >> n >> m;
	for (int i = 0; i < n; i++)
	{
		scanf("%d", &a[i].x);
		a[i].y = i + 1;
	}
	sort(a, a + n);
	for (int i = 0; i < n; i++)
		ainv[a[i].y] = i;
	for (int i = 1; i < n; i++)
		ls[i] = a[i].x-a[0].x;
	for (int i = n - 2; 0 <= i; i--)
		rs[i] = a[n-1].x - a[i].x;
	reverse(rs, rs + n);

	for (int i = 0; i < m; i++)
	{
		int pos, l;
		scanf("%d%d", &pos, &l);
		pos = ainv[pos];
		int prevpos = -1;
		bool rmove = true;
		int lhigh = n;
		int rhigh = n;

		while (prevpos != pos)
		{
			prevpos = pos;
			if (rmove)
			{
				int lsv = ls[pos] + l;
				pos = upper_bound(ls + pos, ls + lhigh, lsv) - ls - 1;
				lhigh = pos+1;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			else
			{
				int rpos = (n - 1) - pos;
				int rsv = rs[rpos] + l;
				rpos = upper_bound(rs + rpos, rs + rhigh, rsv) - rs - 1;
				rhigh = rpos+1;
				pos = (n - 1) - rpos;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			rmove = !rmove;

			int diff = ls[lhigh - 1] - ls[n - rhigh];
			if (diff==0)
				continue;
			int d = l / (ls[lhigh - 1] - ls[n - rhigh]);
			if (d > 0)
			{
				l = l % (ls[n - rhigh] - ls[lhigh - 1]);
				if (d&1)
				{
					if (pos + 1 == lhigh)
					{
						pos = n - rhigh;
						rmove = true;
					}
					else
					{
						pos = lhigh - 1;
						rmove = false;
					}
				};
			}

		}
		cout << a[pos].y << endl;
	}

}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <queue>
#include <unordered_set>
#include <algorithm>
using namespace std;
#define x first
#define y second

typedef long long ll;
const ll MAXN = 200005;
pair<ll, ll> a[MAXN];
ll ainv[MAXN];
ll ls[MAXN], rs[MAXN];
ll n, m;

ll bcomp(const ll &l, const ll &r)
{
	return l > r;
}

int main()
{
	ios::sync_with_stdio(false);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	cin >> n >> m;
	for (ll i = 0; i < n; i++)
	{
		cin >> a[i].x;
		a[i].y = i + 1;
	}

	sort(a, a + n);
	for (ll i = 0; i < n; i++)
		ainv[a[i].y] = i;
	for (ll i = 1; i < n; i++)
		ls[i] = a[i].x - a[0].x;
	for (ll i = n - 2; 0 <= i; i--)
		rs[i] = a[n - 1].x - a[i].x;

	for (ll i = 0; i < m; i++)
	{
		ll pos, l;
		cin >> pos >> l;
		pos = ainv[pos];
		ll prevpos = -1;
		bool rmove = (pos != n - 1);
		ll low = 0;
		ll	high = n;

		while (prevpos != pos)
		{
			prevpos = pos;
			if (rmove)
			{
				ll lsv = ls[pos] + l;
				pos = upper_bound(ls + low, ls + high, lsv) - ls - 1;
				high = pos + 1;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			else
			{
				ll rsv = rs[pos] + l;
				pos = lower_bound(rs + low, rs + high, rsv, bcomp) - rs;
				low = pos;
				l = l - abs(rs[pos] - rs[prevpos]);
			}
			rmove = !rmove;

			ll diff = ls[high - 1] - ls[low];
			if (diff == 0)
				continue;
			ll d = l / diff;
			if (d > 0)
			{
				l = l % diff;
				if (d%2LL==1LL)
				{
					if (pos + 1 == high)
					{
						pos = low;
						rmove = true;
					}
					else
					{
						pos = high - 1;
						rmove = false;
					}
				};
				prevpos = -1;
			}

		}
		cout << a[pos].y << endl;
	}

}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <queue>
#include <unordered_set>
#include <algorithm>
using namespace std;
#define x first
#define y second

typedef long long ll;
const int MAXN = 200005;
pair<int, int> a[MAXN];
int ainv[MAXN];
int ls[MAXN], rs[MAXN];
int n, m;

int bcomp(const int &l, const int &r)
{
	return l > r;
}

int main()
{
	ios::sync_with_stdio(false);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	cin >> n >> m;
	for (int i = 0; i < n; i++)
	{
		scanf("%d", &a[i].x);
		a[i].y = i + 1;
	}
	sort(a, a + n);
	for (int i = 0; i < n; i++)
		ainv[a[i].y] = i;
	for (int i = 1; i < n; i++)
		ls[i] = a[i].x-a[0].x;
	for (int i = n - 2; 0 <= i; i--)
		rs[i] = a[n-1].x - a[i].x;
	//reverse(rs, rs + n);

	for (int i = 0; i < m; i++)
	{
		int pos, l;
		scanf("%d%d", &pos, &l);
		pos = ainv[pos];
		int prevpos = -1;
		bool rmove = (pos!=n-1);
		int low		= 0;
		int	high	= n;

		while (prevpos != pos)
		{
			prevpos = pos;
			if (rmove)
			{
				int lsv = ls[pos] + l;
				pos = upper_bound(ls+low, ls + high, lsv) - ls - 1;
				high = pos + 1;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			else
			{
				int rsv = rs[pos] + l;
				pos = lower_bound(rs+low, rs+high, rsv, bcomp) - rs;
				low = pos;
				l = l - abs(rs[pos] - rs[prevpos]);
			}
			rmove = !rmove;

			int diff = ls[high-1] - ls[low];
			if (diff == 0)
				continue;
			int d = l / diff;
			if (d > 0)
			{
				l = l % diff;
				if (d & 1)
				{
					if (pos + 1 == high)
					{
						pos = low;
						rmove = true;
					}
					else
					{
						pos = high-1;
						rmove = false;
					}
				};
				prevpos = -1;
			}

		}
		cout << a[pos].y << endl;
	}

}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <queue>
#include <unordered_set>
#include <algorithm>
using namespace std;
#define x first
#define y second

typedef long long ll;
const int MAXN = 200005;
pair<int, int> a[MAXN];
int ainv[MAXN];
int ls[MAXN], rs[MAXN];
int n, m;

int bcomp(const int &l, const int &r)
{
	return l > r;
}

int main()
{
	ios::sync_with_stdio(false);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	cin >> n >> m;
	for (int i = 0; i < n; i++)
	{
		scanf("%d", &a[i].x);
		a[i].y = i + 1;
	}
	sort(a, a + n);
	for (int i = 0; i < n; i++)
		ainv[a[i].y] = i;
	for (int i = 1; i < n; i++)
		ls[i] = a[i].x-a[0].x;
	for (int i = n - 2; 0 <= i; i--)
		rs[i] = a[n-1].x - a[i].x;
	//reverse(rs, rs + n);

	for (int i = 0; i < m; i++)
	{
		int pos, l;
		scanf("%d%d", &pos, &l);
		pos = ainv[pos];
		int prevpos = -1;
		bool rmove = (pos!=n-1);
		int lhigh = n;
		int rhigh = n;

		while (prevpos != pos)
		{
			prevpos = pos;
			if (rmove)
			{
				int lsv = ls[pos] + l;
				pos = upper_bound(ls, ls + n, lsv) - ls - 1;
				lhigh = pos + 1;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			else
			{
				int rsv = rs[pos] + l;
				pos = lower_bound(rs, rs+n, rsv, bcomp) - rs;
				rhigh = pos;
				l = l - abs(rs[pos] - rs[prevpos]);
			}
			rmove = !rmove;

			//int diff = ls[lhigh - 1] - ls[n - rhigh];
			//if (diff==0)
			//	continue;
			//int d = l / (ls[lhigh - 1] - ls[n - rhigh]);
			//if (d > 0)
			//{
			//	l = l % (ls[n - rhigh] - ls[lhigh - 1]);
			//	if (d&1)
			//	{
			//		if (pos + 1 == lhigh)
			//		{
			//			pos = n - rhigh;
			//			rmove = true;
			//		}
			//		else
			//		{
			//			pos = lhigh - 1;
			//			rmove = false;
			//		}
			//	};
			//}

		}
		cout << a[pos].y << endl;
	}

}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <queue>
#include <unordered_set>
#include <algorithm>
using namespace std;
#define x first
#define y second

typedef long long ll;
const int MAXN = 200005;
int a[MAXN];
int ls[MAXN], rs[MAXN];
int n, m;

int main()
{
	ios::sync_with_stdio(false);

	cin >> n >> m;
	for (int i = 0; i < n; i++)
		scanf("%d", &a[i]);
	for (int i = 1; i < n; i++)
		ls[i] = a[i]-a[0];
	for (int i = n - 2; 0 <= i; i--)
		rs[i] = a[n-1] - a[i];
	reverse(rs, rs + n);

	for (int i = 0; i < m; i++)
	{
		int pos, l;
		scanf("%d%d", &pos, &l);
		pos--;
		int prevpos = -1;
		bool rmove = true;
		int lhigh = n;
		int rhigh = n;
		while (prevpos != pos)
		{
			prevpos = pos;
			if (rmove)
			{
				int lsv = ls[pos] + l;
				pos = upper_bound(ls + pos, ls + lhigh, lsv) - ls - 1;
				lhigh = pos+1;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			else
			{
				int rpos = (n - 1) - pos;
				int rsv = rs[rpos] + l;
				rpos = upper_bound(rs + rpos, rs + rhigh, rsv) - rs - 1;
				rhigh = rpos+1;
				pos = (n - 1) - rpos;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			rmove = !rmove;
		}
		cout << pos + 1 << endl;
	}

}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <queue>
#include <unordered_set>
#include <algorithm>
using namespace std;
#define x first
#define y second

typedef long long ll;
const int MAXN = 200005;
int a[MAXN];
int ls[MAXN], rs[MAXN];
int n, m;

int main()
{
	ios::sync_with_stdio(false);

	cin >> n >> m;
	for (int i = 0; i < n; i++)
		scanf("%d", &a[i]);
	for (int i = 1; i < n; i++)
		ls[i] = a[i]-a[0];
	for (int i = n - 2; 0 <= i; i--)
		rs[i] = a[n-1] - a[i];
	reverse(rs, rs + n);

	for (int i = 0; i < m; i++)
	{
		int pos, l;
		scanf("%d%d", &pos, &l);
		pos--;
		int prevpos = -1;
		bool rmove = true;
		int lhigh = n;
		int rhigh = n;

		while (prevpos != pos)
		{
			prevpos = pos;
			if (rmove)
			{
				int lsv = ls[pos] + l;
				pos = upper_bound(ls + pos, ls + lhigh, lsv) - ls - 1;
				lhigh = pos+1;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			else
			{
				int rpos = (n - 1) - pos;
				int rsv = rs[rpos] + l;
				rpos = upper_bound(rs + rpos, rs + rhigh, rsv) - rs - 1;
				rhigh = rpos+1;
				pos = (n - 1) - rpos;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			rmove = !rmove;

			int diff = ls[lhigh - 1] - ls[n - rhigh];
			if (diff==0)
				continue;
			int d = l / (ls[lhigh - 1] - ls[n - rhigh]);
			if (d > 0)
			{
				l = l % (ls[n - rhigh] - ls[lhigh - 1]);
				if (d&1)
				{
					if (pos + 1 == lhigh)
					{
						pos = n - rhigh;
						rmove = true;
					}
					else
					{
						pos = lhigh - 1;
						rmove = false;
					}
				};
			}

		}
		cout << pos + 1 << endl;
	}

}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <queue>
#include <unordered_set>
#include <algorithm>
using namespace std;
#define x first
#define y second

typedef long long ll;
const int MAXN = 200005;
pair<int, int> a[MAXN];
int ainv[MAXN];
int ls[MAXN], rs[MAXN];
int n, m;

int main()
{
	ios::sync_with_stdio(false);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	cin >> n >> m;
	for (int i = 0; i < n; i++)
	{
		scanf("%d", &a[i].x);
		a[i].y = i + 1;
	}
	sort(a, a + n);
	for (int i = 0; i < n; i++)
		ainv[a[i].y] = i;
	for (int i = 1; i < n; i++)
		ls[i] = a[i].x-a[0].x;
	for (int i = n - 2; 0 <= i; i--)
		rs[i] = a[n-1].x - a[i].x;
	reverse(rs, rs + n);

	for (int i = 0; i < m; i++)
	{
		int pos, l;
		scanf("%d%d", &pos, &l);
		pos = ainv[pos];
		int prevpos = -1;
		bool rmove = true;
		int lhigh = n;
		int rhigh = n;

		while (prevpos != pos)
		{
			prevpos = pos;
			if (rmove)
			{
				int lsv = ls[pos] + l;
				pos = upper_bound(ls + pos, ls + lhigh, lsv) - ls - 1;
				lhigh = pos+1;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			else
			{
				int rpos = (n - 1) - pos;
				int rsv = rs[rpos] + l;
				rpos = upper_bound(rs + rpos, rs + rhigh, rsv) - rs - 1;
				rhigh = rpos+1;
				pos = (n - 1) - rpos;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			rmove = !rmove;

			//int diff = ls[lhigh - 1] - ls[n - rhigh];
			//if (diff==0)
			//	continue;
			//int d = l / (ls[lhigh - 1] - ls[n - rhigh]);
			//if (d > 0)
			//{
			//	l = l % (ls[n - rhigh] - ls[lhigh - 1]);
			//	if (d&1)
			//	{
			//		if (pos + 1 == lhigh)
			//		{
			//			pos = n - rhigh;
			//			rmove = true;
			//		}
			//		else
			//		{
			//			pos = lhigh - 1;
			//			rmove = false;
			//		}
			//	};
			//}

		}
		cout << a[pos].y << endl;
	}

}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <queue>
#include <unordered_set>
#include <algorithm>
using namespace std;
#define x first
#define y second

typedef long long ll;
const int MAXN = 200005;
pair<int, int> a[MAXN];
int ls[MAXN], rs[MAXN];
int n, m;

int main()
{
	ios::sync_with_stdio(false);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	cin >> n >> m;
	for (int i = 0; i < n; i++)
	{
		scanf("%d", &a[i].x);
		a[i].y = i + 1;
	}
	sort(a, a + n);
	for (int i = 1; i < n; i++)
		ls[i] = a[i].x-a[0].x;
	for (int i = n - 2; 0 <= i; i--)
		rs[i] = a[n-1].x - a[i].x;
	reverse(rs, rs + n);

	for (int i = 0; i < m; i++)
	{
		int pos, l;
		scanf("%d%d", &pos, &l);
		pos--;
		int prevpos = -1;
		bool rmove = true;
		int lhigh = n;
		int rhigh = n;

		while (prevpos != pos)
		{
			prevpos = pos;
			if (rmove)
			{
				int lsv = ls[pos] + l;
				pos = upper_bound(ls + pos, ls + lhigh, lsv) - ls - 1;
				lhigh = pos+1;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			else
			{
				int rpos = (n - 1) - pos;
				int rsv = rs[rpos] + l;
				rpos = upper_bound(rs + rpos, rs + rhigh, rsv) - rs - 1;
				rhigh = rpos+1;
				pos = (n - 1) - rpos;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			rmove = !rmove;

			int diff = ls[lhigh - 1] - ls[n - rhigh];
			if (diff==0)
				continue;
			int d = l / (ls[lhigh - 1] - ls[n - rhigh]);
			if (d > 0)
			{
				l = l % (ls[n - rhigh] - ls[lhigh - 1]);
				if (d&1)
				{
					if (pos + 1 == lhigh)
					{
						pos = n - rhigh;
						rmove = true;
					}
					else
					{
						pos = lhigh - 1;
						rmove = false;
					}
				};
			}

		}
		cout << a[pos].y << endl;
	}

}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <queue>
#include <unordered_set>
#include <algorithm>
using namespace std;
#define x first
#define y second

typedef long long ll;
const int MAXN = 200005;
pair<int, int> a[MAXN];
int ainv[MAXN];
int ls[MAXN], rs[MAXN];
int n, m;

int bcomp(const int &l, const int &r)
{
	return l > r;
}

int main()
{
	ios::sync_with_stdio(false);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	cin >> n >> m;
	for (int i = 0; i < n; i++)
	{
		scanf("%d", &a[i].x);
		a[i].y = i + 1;
	}
	sort(a, a + n);
	for (int i = 0; i < n; i++)
		ainv[a[i].y] = i;
	for (int i = 1; i < n; i++)
		ls[i] = a[i].x-a[0].x;
	for (int i = n - 2; 0 <= i; i--)
		rs[i] = a[n-1].x - a[i].x;
	//reverse(rs, rs + n);

	for (int i = 0; i < m; i++)
	{
		int pos, l;
		scanf("%d%d", &pos, &l);
		pos = ainv[pos];
		int prevpos = -1;
		bool rmove = true;
		int lhigh = n;
		int rhigh = n;

		while (prevpos != pos)
		{
			prevpos = pos;
			if (rmove)
			{
				int lsv = ls[pos] + l;
				pos = upper_bound(ls, ls + n, lsv) - ls - 1;
				lhigh = pos + 1;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			else
			{
				int rsv = rs[pos] + l;
				pos = lower_bound(rs, rs+n, rsv, bcomp) - rs;
				rhigh = pos;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			rmove = !rmove;

			//int diff = ls[lhigh - 1] - ls[n - rhigh];
			//if (diff==0)
			//	continue;
			//int d = l / (ls[lhigh - 1] - ls[n - rhigh]);
			//if (d > 0)
			//{
			//	l = l % (ls[n - rhigh] - ls[lhigh - 1]);
			//	if (d&1)
			//	{
			//		if (pos + 1 == lhigh)
			//		{
			//			pos = n - rhigh;
			//			rmove = true;
			//		}
			//		else
			//		{
			//			pos = lhigh - 1;
			//			rmove = false;
			//		}
			//	};
			//}

		}
		cout << a[pos].y << endl;
	}

}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <queue>
#include <unordered_set>
#include <algorithm>
using namespace std;
#define x first
#define y second

typedef long long ll;
const int MAXN = 200005;
pair<int, int> a[MAXN];
int ainv[MAXN];
int ls[MAXN], rs[MAXN];
int n, m;

int bcomp(const int &l, const int &r)
{
	return l > r;
}

int main()
{
	ios::sync_with_stdio(false);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	cin >> n >> m;
	for (int i = 0; i < n; i++)
	{
		scanf("%d", &a[i].x);
		a[i].y = i + 1;
	}
	sort(a, a + n);
	for (int i = 0; i < n; i++)
		ainv[a[i].y] = i;
	for (int i = 1; i < n; i++)
		ls[i] = a[i].x-a[0].x;
	for (int i = n - 2; 0 <= i; i--)
		rs[i] = a[n-1].x - a[i].x;
	//reverse(rs, rs + n);

	for (int i = 0; i < m; i++)
	{
		int pos, l;
		scanf("%d%d", &pos, &l);
		pos = ainv[pos];
		int prevpos = -1;
		bool rmove = (pos!=n-1);
		int low		= 0;
		int	high	= n;

		while (prevpos != pos)
		{
			prevpos = pos;
			if (rmove)
			{
				int lsv = ls[pos] + l;
				pos = upper_bound(ls+low, ls + high, lsv) - ls - 1;
				high = pos + 1;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			else
			{
				int rsv = rs[pos] + l;
				pos = lower_bound(rs+low, rs+high, rsv, bcomp) - rs;
				low = pos;
				l = l - abs(rs[pos] - rs[prevpos]);
			}
			rmove = !rmove;

			int diff = ls[high-1] - ls[low];
			if (diff == 0)
				continue;
			int d = l / diff;
			if (d > 0)
			{
				l = l % diff;
				if (d & 1)
				{
					if (pos + 1 == high)
					{
						pos = low;
						rmove = true;
					}
					else
					{
						pos = high-1;
						rmove = false;
					}
				};
			}

		}
		cout << a[pos].y << endl;
	}

}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <queue>
#include <unordered_set>
#include <algorithm>
using namespace std;
#define x first
#define y second

typedef long long ll;
const int MAXN = 200005;
pair<ll, int> a[MAXN];
int ainv[MAXN];
ll ls[MAXN], rs[MAXN];
int n, m;

int bcomp(const ll &l, const ll &r)
{
	return l > r;
}

int main()
{
	ios::sync_with_stdio(false);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	cin >> n >> m;
	for (int i = 0; i < n; i++)
	{
		//scanf("%d", &a[i].x);
		cin >> a[i].x;
		a[i].y = i + 1;
	}
	sort(a, a + n);
	for (int i = 0; i < n; i++)
		ainv[a[i].y] = i;
	for (int i = 1; i < n; i++)
		ls[i] = a[i].x - a[0].x;
	for (int i = n - 2; 0 <= i; i--)
		rs[i] = a[n - 1].x - a[i].x;
	//reverse(rs, rs + n);

	for (int i = 0; i < m; i++)
	{
		ll pos, l;
		cin >> pos >> l;
		pos = ainv[pos];
		int prevpos = -1;
		bool rmove = (pos != n - 1);
		int low = 0;
		int	high = n;

		while (prevpos != pos)
		{
			prevpos = pos;
			if (rmove)
			{
				ll lsv = ls[pos] + l;
				pos = upper_bound(ls + low, ls + high, lsv) - ls - 1;
				high = pos + 1;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			else
			{
				ll rsv = rs[pos] + l;
				pos = lower_bound(rs + low, rs + high, rsv, bcomp) - rs;
				low = pos;
				l = l - abs(rs[pos] - rs[prevpos]);
			}
			rmove = !rmove;

			ll diff = ls[high - 1] - ls[low];
			if (diff == 0)
				continue;
			ll d = l / diff;
			if (d > 0)
			{
				l = l % diff;
				if (d & 1)
				{
					if (pos + 1 == high)
					{
						pos = low;
						rmove = true;
					}
					else
					{
						pos = high - 1;
						rmove = false;
					}
				};
				prevpos = -1;
			}

		}
		cout << a[pos].y << endl;
	}

}


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <queue>
#include <unordered_set>
#include <algorithm>
using namespace std;
#define x first
#define y second

typedef long long ll;
const int MAXN = 200005;
int a[MAXN];
int ls[MAXN], rs[MAXN];
int n, m;

int main()
{
	ios::sync_with_stdio(false);

	cin >> n >> m;
	for (int i = 0; i < n; i++)
		scanf("%d", &a[i]);
	for (int i = 1; i < n; i++)
		ls[i] = a[i]-a[0];
	for (int i = n - 2; 0 <= i; i--)
		rs[i] = a[n-1] - a[i];
	reverse(rs, rs + n);

	for (int i = 0; i < m; i++)
	{
		int pos, l;
		scanf("%d%d", &pos, &l);
		pos--;
		int prevpos = -1;
		bool rmove = true;
		while (prevpos != pos)
		{
			prevpos = pos;
			if (rmove)
			{
				int lsv = ls[pos] + l;
				pos = upper_bound(ls + pos, ls + n, lsv) - ls - 1;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			else
			{
				int rpos = (n - 1) - pos;
				int rsv = rs[rpos] + l;
				rpos = upper_bound(rs + rpos, rs + n, rsv) - rs - 1;
				pos = (n - 1) - rpos;
				l = l - abs(ls[pos] - ls[prevpos]);
			}
			rmove = !rmove;
		}
		cout << pos + 1 << endl;
	}

}


#include <functional>
#include <algorithm>
#include <iostream>
#include <memory.h>
#include <sstream>
#include <assert.h>
#include <fstream>
#include <iomanip>
#include <bitset>
#include <string>
#include <cstdio>
#include <complex>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <set>
#include <map>
using namespace std;

#define int64 long long
#define mp make_pair

const int inf = 1e9;

#ifdef _DEBUG
    const int N = 5010;
#else
    const int N = 300010;
#endif

#define y1 variable1

const int nbits = 31;
const int blocks = 170;

int n, m, x[N], pos[N];
pair <int, int> p[N];

int find1(int y)
{
    int l = 1, r = n;
    while (l + 1 < r)
    {
        int m = (l + r) / 2;
        if (x[m] > y) r = m - 1;
        else l = m;
    }
    if (x[r] <= y) return r;
    return l;
}

int find2(int y)
{
    int l = 1, r = n;
    while (l + 1 < r)
    {
        int m = (l + r) / 2;
        if (x[m] < y) l = m + 1;
        else r = m;
    }
    if (x[l] >= y) return l;
    return r;
}

int main()
{
#ifdef _DEBUG
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    scanf("%d%d", &n, &m);
    for (int i = 1; i <= n; i++) scanf("%d", &p[i].first);
    for (int i = 1; i <= n; i++) p[i].second = i;
    sort(p + 1, p + n + 1);
    for (int i = 1; i <= n; i++) x[i] = p[i].first;
    for (int i = 1; i <= n; i++) pos[i] = p[i].second;
    for (int i = 1; i <= m; i++)
    {
        int j, l;
        scanf("%d%d", &j, &l);
        int dir = 1;
        int res = -1;
        while (true)
        {
            int j1 = find1(x[j] + l), j2 = find2(x[j] - l);
            if (j1 == j && j2 == j)
            {
                res = pos[j];
                break;
            }
            if (j1 == j || (dir == -1 && j2 != -1))
            {
                if ((l / (x[j] - x[j2])) % 2 != 0)
                {
                    l %= x[j] - x[j2];
                    j = j2;
                    dir = 1;
                }
                else
                {
                    l %= x[j] - x[j2];
                    dir = -1;
                }
            }
            else
            {
                if ((l / (x[j1] - x[j])) % 2 != 0)
                {
                    l %= x[j1] - x[j];
                    j = j1;
                    dir = -1;
                }
                else
                {
                    l %= x[j1] - x[j];
                }
            }
        }
        printf("%d\n", res);
    }
    return 0;
}


#include <functional>
#include <algorithm>
#include <iostream>
#include <memory.h>
#include <sstream>
#include <assert.h>
#include <fstream>
#include <iomanip>
#include <bitset>
#include <string>
#include <cstdio>
#include <complex>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <set>
#include <map>
using namespace std;

#define int64 long long
#define mp make_pair

const int inf = 1e9;

#ifdef _DEBUG
    const int N = 5010;
#else
    const int N = 300010;
#endif

#define y1 variable1

const int nbits = 31;
const int blocks = 170;

int n, m, x[N], pos[N];
pair <int, int> p[N];

int find1(int y)
{
    int l = 1, r = n;
    while (l + 1 < r)
    {
        int m = (l + r) / 2;
        if (x[m] > y) r = m - 1;
        else l = m;
    }
    if (x[r] <= y) return r;
    return l;
}

int find2(int y)
{
    int l = 1, r = n;
    while (l + 1 < r)
    {
        int m = (l + r) / 2;
        if (x[m] < y) l = m + 1;
        else r = m;
    }
    if (x[l] >= y) return l;
    return r;
}

int main()
{
#ifdef _DEBUG
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    scanf("%d%d", &n, &m);
    for (int i = 1; i <= n; i++) scanf("%d", &p[i].first);
    for (int i = 1; i <= n; i++) p[i].second = i;
    sort(p + 1, p + n + 1);
    for (int i = 1; i <= n; i++) x[i] = p[i].first;
    for (int i = 1; i <= n; i++) pos[i] = p[i].second;
    for (int i = 1; i <= m; i++)
    {
        int j, l;
        scanf("%d%d", &j, &l);
        int dir = 1;
        int res = -1;
        while (true)
        {
            int j1 = find1(x[j] + l), j2 = find2(x[j] - l);
            if (j1 == j && j2 == j)
            {
                res = pos[j];
                break;
            }
            if (j1 == j || (dir == -1 && j2 != -1))
            {
                if ((l / (x[j] - x[j2])) % 2 != 0)
                {
                    l %= x[j] - x[j2];
                    j = j2;
                    dir = 1;
                }
                else
                {
                    l %= x[j] - x[j2];
                    dir = -1;
                }
            }
            else
            {
                if ((l / (x[j1] - x[j])) % 2 != 0)
                {
                    l %= x[j1] - x[j];
                    j = j1;
                    dir = -1;
                }
                else
                {
                    l %= x[j1] - x[j];
                }
            }
        }
        res = pos[res];
        printf("%d\n", res);
    }
    return 0;
}


#include <functional>
#include <algorithm>
#include <iostream>
#include <memory.h>
#include <sstream>
#include <assert.h>
#include <fstream>
#include <iomanip>
#include <bitset>
#include <string>
#include <cstdio>
#include <complex>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <set>
#include <map>
using namespace std;

#define int64 long long
#define mp make_pair

const int inf = 2e9+1;

#ifdef _DEBUG
    const int N = 5010;
#else
    const int N = 300010;
#endif

#define y1 variable1

const int nbits = 31;
const int blocks = 170;

int n, m, x[N], pos[N];
pair <int, int> p[N];

int find1(int y)
{
    int l = 1, r = n;
    while (l + 1 < r)
    {
        int m = (l + r) / 2;
        if (x[m] > y) r = m - 1;
        else l = m;
    }
    if (x[r] <= y) return r;
    return l;
}

int find2(int y)
{
    int l = 1, r = n;
    while (l + 1 < r)
    {
        int m = (l + r) / 2;
        if (x[m] < y) l = m + 1;
        else r = m;
    }
    if (x[l] >= y) return l;
    return r;
}

int main()
{
#ifdef _DEBUG
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    scanf("%d%d", &n, &m);
    for (int i = 1; i <= n; i++) scanf("%d", &p[i].first);
    for (int i = 1; i <= n; i++) p[i].second = i;
    sort(p + 1, p + n + 1);
    for (int i = 1; i <= n; i++) x[i] = p[i].first;
    for (int i = 1; i <= n; i++) pos[i] = p[i].second;
    x[n + 1] = inf;
    x[0] = -inf;
    for (int i = 1; i <= m; i++)
    {
        int j, l;
        scanf("%d%d", &j, &l);
        int dir = 1;
        int res = -1;
        while (true)
        {
            int j1 = find1(x[j] + l), j2 = find2(x[j] - l);
            if (j1 == j && j2 == j)
            {
                res = pos[j];
                break;
            }
            if (j1 == j || (dir == -1 && j2 != -1))
            {
                if ((l / (x[j] - x[j2])) % 2 != 0)
                {
                    l %= x[j] - x[j2];
                    j = j2;
                    dir = 1;
                }
                else
                {
                    l %= x[j] - x[j2];
                    dir = -1;
                }
            }
            else
            {
                if ((l / (x[j1] - x[j])) % 2 != 0)
                {
                    l %= x[j1] - x[j];
                    j = j1;
                    dir = -1;
                }
                else
                {
                    l %= x[j1] - x[j];
                }
            }
        }
        printf("%d\n", res);
    }
    return 0;
}


#include <functional>
#include <algorithm>
#include <iostream>
#include <memory.h>
#include <sstream>
#include <assert.h>
#include <fstream>
#include <iomanip>
#include <bitset>
#include <string>
#include <cstdio>
#include <complex>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <set>
#include <map>
using namespace std;

#define int64 long long
#define mp make_pair

const int inf = 2e9+1;

#ifdef _DEBUG
    const int N = 5010;
#else
    const int N = 300010;
#endif

#define y1 variable1

const int nbits = 31;
const int blocks = 170;

int n, m, x[N], pos[N], pos1[N];
pair <int, int> p[N];

int find1(int y)
{
    int l = 1, r = n;
    while (l + 1 < r)
    {
        int m = (l + r) / 2;
        if (x[m] > y) r = m - 1;
        else l = m;
    }
    if (x[r] <= y) return r;
    return l;
}

int find2(int y)
{
    int l = 1, r = n;
    while (l + 1 < r)
    {
        int m = (l + r) / 2;
        if (x[m] < y) l = m + 1;
        else r = m;
    }
    if (x[l] >= y) return l;
    return r;
}

int main()
{
#ifdef _DEBUG
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    scanf("%d%d", &n, &m);
    for (int i = 1; i <= n; i++) scanf("%d", &p[i].first);
    for (int i = 1; i <= n; i++) p[i].second = i;
    sort(p + 1, p + n + 1);
    for (int i = 1; i <= n; i++) x[i] = p[i].first;
    for (int i = 1; i <= n; i++) pos[i] = p[i].second;
    for (int i = 1; i <= n; i++) pos1[pos[i]] = i;
    x[n + 1] = inf;
    x[0] = -inf;
    for (int i = 1; i <= m; i++)
    {
        int j, l;
        scanf("%d%d", &j, &l);
        j = pos1[j];
        int dir = 1;
        int prev = -1;
        int res = -1;
        while (true)
        {
            int j1 = find1(x[j] + l), j2 = find2(x[j] - l);
            if (j1 == j && j2 == j)
            {
                res = pos[j];
                break;
            }
            if (j1 == j || (dir == -1 && j2 != -1))
            {
                if (prev == j2)
                {
                    if ((l / (x[j] - x[j2])) % 2 != 0)
                    {
                        l %= x[j] - x[j2];
                        prev = j;
                        j = j2;
                        dir = 1;
                    }
                    else
                    {
                        l %= x[j] - x[j2];
                        dir = -1;
                    }
                }
                else
                {
                    l -= x[j] - x[j2];
                    prev = j;
                    j = j2;
                    dir = 1;
                }
            }
            else
            {
                if (prev == j1)
                {
                    if ((l / (x[j1] - x[j])) % 2 != 0)
                    {
                        l %= x[j1] - x[j];
                        prev = j;
                        j = j1;
                        dir = -1;
                    }
                    else
                    {
                        l %= x[j1] - x[j];
                        dir = 1;
                    }
                }
                else
                {
                    l -= x[j1] - x[j];
                    prev = j;
                    j = j1;
                    dir = -1;
                }
            }
        }
        printf("%d\n", res);
    }
    return 0;
}


#include <functional>
#include <algorithm>
#include <iostream>
#include <memory.h>
#include <sstream>
#include <assert.h>
#include <fstream>
#include <iomanip>
#include <bitset>
#include <string>
#include <cstdio>
#include <complex>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <set>
#include <map>
using namespace std;

#define int64 long long
#define mp make_pair

const int inf = 2e9+1;

#ifdef _DEBUG
    const int N = 5010;
#else
    const int N = 300010;
#endif

#define y1 variable1

const int nbits = 31;
const int blocks = 170;

int n, m, x[N], pos[N];
pair <int, int> p[N];

int find1(int y)
{
    int l = 1, r = n;
    while (l + 1 < r)
    {
        int m = (l + r) / 2;
        if (x[m] > y) r = m - 1;
        else l = m;
    }
    if (x[r] <= y) return r;
    return l;
}

int find2(int y)
{
    int l = 1, r = n;
    while (l + 1 < r)
    {
        int m = (l + r) / 2;
        if (x[m] < y) l = m + 1;
        else r = m;
    }
    if (x[l] >= y) return l;
    return r;
}

int main()
{
#ifdef _DEBUG
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    scanf("%d%d", &n, &m);
    for (int i = 1; i <= n; i++) scanf("%d", &p[i].first);
    for (int i = 1; i <= n; i++) p[i].second = i;
    sort(p + 1, p + n + 1);
    for (int i = 1; i <= n; i++) x[i] = p[i].first;
    for (int i = 1; i <= n; i++) pos[i] = p[i].second;
    x[n + 1] = inf;
    x[0] = -inf;
    for (int i = 1; i <= m; i++)
    {
        int j, l;
        scanf("%d%d", &j, &l);
        int dir = 1;
        int prev = -1;
        int res = -1;
        while (true)
        {
            int j1 = find1(x[j] + l), j2 = find2(x[j] - l);
            if (j1 == j && j2 == j)
            {
                res = pos[j];
                break;
            }
            if (j1 == j || (dir == -1 && j2 != -1))
            {
                if (prev == j2)
                {
                    if ((l / (x[j] - x[j2])) % 2 != 0)
                    {
                        l %= x[j] - x[j2];
                        prev = j;
                        j = j2;
                        dir = 1;
                    }
                    else
                    {
                        l %= x[j] - x[j2];
                        dir = -1;
                    }
                }
                else
                {
                    l -= x[j] - x[j2];
                    prev = j;
                    j = j2;
                    dir = 1;
                }
            }
            else
            {
                if (prev == j1)
                {
                    if ((l / (x[j1] - x[j])) % 2 != 0)
                    {
                        l %= x[j1] - x[j];
                        prev = j;
                        j = j1;
                        dir = -1;
                    }
                    else
                    {
                        l %= x[j1] - x[j];
                        dir = 1;
                    }
                }
                else
                {
                    l -= x[j1] - x[j];
                    prev = j;
                    j = j1;
                    dir = -1;
                }
            }
        }
        printf("%d\n", res);
    }
    return 0;
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cstring>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <cmath>
#include <stack>
#include <complex>
#include <ctime>
#include <unordered_map>
#include <unordered_set>
#pragma comment (linker, "/STACK:256000000")

using namespace std;

const int maxN = 210000;

int n, m;
int x[maxN], y[maxN];
unordered_map < int, int > M;

int solve(int index, int L, int isright = true) {
	if (isright) {
		int p = upper_bound(x, x + n, x[index] + L) - x - 1;

		L -= x[p] - x[index];

		int q = lower_bound(x, x + n, x[p] - L) - x;

		L -= x[p] - x[q];

		if (p == q) {
			return M[x[p]] + 1;
		}

		int d = x[p] - x[q];

		int parts = L / d;
		if (parts == 0) {
			return solve(q, L, true);
		}

		if (parts % 2 == 0) {
			return solve(q, L % d, true);
		}
		return solve(p, L % d, false);
	}
	int p = lower_bound(x, x + n, x[index] - L) - x;
	return solve(p, L - (x[p] - x[index]), true);
}

int main() {
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	scanf("%d%d", &n, &m);
	for (int i = 0; i < n; ++i) {
		scanf("%d", &x[i]);
		y[i] = x[i];
		M[x[i]] = i;
	}
	sort(x, x + n);

	for (int i = 0; i < m; ++i) {
		int v, l;
		scanf("%d%d", &v, &l);
		int index = lower_bound(x, x + n, y[v - 1]) - x;
		printf("%d\n", solve(index, l));
	}

	return 0;
}


n = gets.to_i
x = 0
n.times do
    op = gets
    op.include?("+") ? x += 1 : x -= 1
end
puts x


#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <set>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <map>
using namespace std;
#define INF 0x73737373
#define EPS 1e-8
#define lson l, m, rt<<1
#define rson m+1, r, rt<<1|1
int main()
{
    string s;
    int n, x = 0;
    cin >> n;
    for(int i = 0; i < n; i++)
    {
        cin >> s;
        for(int j = 0; j < s.size(); j++)
            if(s[j] == '+')
            {
                x++;
                break;
            }
            else if(s[j] == '-')
            {
                x--;
                break;
            }
    }
    cout << x << endl;
	return 0;
}


inputs = gets
x = 0
(1..inputs.to_i).each do|n|
  s = gets.chomp.split('').sort.join
  if s == "++X".split('').sort.join
    x+=1
  elsif s == "--X".split('').sort.join
    x-=1
  end
end

puts x


n =  gets.strip.to_i
arr = []
last = ""

n.times do |i|
 x = gets.strip.to_s
 x.include?("+") ? arr << 1 : arr << -1
 last = x if (n - i == 1)
end

puts  arr.reduce(0){|init,ele| init + ele}


n =  gets.strip.to_i
arr = []
last = ""

n.times do |i|
 x = gets.strip.to_s
 x.include?("+") ? arr << 1 : arr << -1
 last = x if (n - i == 1)
end

if last[0] != "+" and  last[0] != "-"
  arr[arr.length  - 1]  =  0
end

puts  arr.reduce(0){|init,ele| init + ele}


init = 0
gets.to_i.times do
  if gets =~ /\+\+/
    init += 1
  else
    init -= 1
  end
end
puts init


i = gets.to_i
counter = 0
(1..i).each do |x|
  counter += gets.chomp === 'X++' ? 1 : -1
end
print counter


i = gets.to_i
counter = 0
(1..i).each do |x|
  counter += gets.chomp  =~ /\+\+/ ? 1 : -1
end
print counter


str = Array.new
n = gets.chomp
n = n.to_i
n.times do |i|
    str[i] = gets.chomp
end
x=0
str.each do |i|
    if i == "X++" || i == "++X"
        x+=1
    else
        x-=1
    end
end
print "#{x}"


n=Integer(gets.chomp)
x=0
until n==0
    if gets.chomp.index('+')!=nil
        x = 1 + x
    else
        x = x - 1
    end
    n -= 1
end
puts x


ans = 0
gets.to_i.times do
  op = gets.chomp
  if op.include?("+")
    ans += 1
  else
    ans -= 1
  end
end
puts ans


# your code goes here
n = gets.chomp.to_i
c =0
while n > 0 do
	s =gets
	c = c+1 if s.include? "++"
	c=c-1 if s.include? "--"
	n=n-1
end
p c


ret = 0
gets.to_i.times do
    if (gets =~ /-/) then ret -= 1 else ret += 1 end
end
puts ret


a=gets.chomp.to_i
x=0
a.times do
b=gets.chomp
if b[0]=="+" || b[2] == "+"
x+=1
else
x-=1
end
end

puts "#{x}"


n = gets.chomp.to_i
  r = 0
  n.times {
    x = gets.chomp
    case x
    when "++X", "X++"
      r += 1
    else
      r -= 1
    end
  }
  puts r


x=0
gets.to_i.times{
	s=gets.chomp
	x=x+(" ++X++".index(s)?1:-1)
}
puts x


require 'scanf'

n = $stdin.readline.to_i
x = 0

n.times do |i|
  line = $stdin.readline
  line = line.chomp('').downcase
  line = line[0, 3]
  if line == "++x" || line == "x++"
    x += 1
  elsif line == "--x" || line == "x--"
    x -= 1
  end
end

puts x


$stdin = File.open("./input.txt", "r") if ENV["USER"] == "new"
# ====================================

x=0
n = gets.to_i

n.times{
  cmd = gets.strip

  x+=1 if cmd.include? "+"
  x-=1 if cmd.include? "-"
}

puts x


x = 0
n = gets.chomp.to_i
n.times do
	value = gets.chomp
	x = x + 1 if value.scan("+").count == 2 unless value.scan("X").count == 0
	x = x - 1 if value.scan("-").count == 2 unless value.scan("X").count == 0
end
puts(x)


x = 0

gets.strip.to_i.times do
  statement = gets.strip
  x += 1 if statement.include?('++')
  x -= 1 if statement.include?('--')
end

puts x


n = gets.chomp.to_i
ans = 0
n.times{
  line = gets.chomp
  ans += 1 if line.include? "+"
  ans -= 1 if line.include? "-"
}
puts ans


n = gets.to_i
o=0

for i in 1..n
  gets.chomp[1] == '+' ? o+=1 : o-=1
end

p o


r = 0

gets.to_i.times do
  if gets[1] == '+'
    r += 1
  else
    r -= 1
  end
end

puts r


n=gets.chomp.to_i
x=0
n.times{
    s=gets.chomp.to_s
    if s.scan(/\+\+/) { |match|
        x+=1
    }
    end
    if s.scan(/--/) { |match|
        x-=1
    }
    end
}
puts (x)


p gets.to_i.times.map{gets=~/\+/?1: -1}.inject &:+


statement_count = gets.chomp.to_i
accum = 0

for i in 1..statement_count
  line = gets.chomp
  if line.include? '+'
    accum += 1
  elsif line.include? '-'
    accum -= 1
  end
end

puts accum


n = Integer(gets)
operation = Array.new
for i in 0...n
    operation[i] = Array.new
    input = gets.chomp
    operation[i] = input
end
x = 0
for i in 0...n
    if operation[i] == "++X" || operation[i] =="X++"
        x += 1
    else
        x -= 1
    end
end
puts x


x = 0
n = gets.chomp.to_i
i = 0
if n >= 1 && n <= 150
	while i < n
		statement = gets.chomp
		if statement == "++X" || statement == "++x" || statement == "x++" || statement == "X++"
			x += 1
		elsif statement == "--X" || statement == "--x" || statement == "x--" || statement == "X--"
			x -= 1
		end
		i += 1
	end
end

puts x


counter=0
gets.to_i.times{(gets.chomp.include?"+")?counter+=1:counter-=1}
print counter


n = gets.chomp.to_i

x = 0

n.times do |i|
    str = gets.chomp
    case str
    when '++X', 'X++'
        x += 1
    when '--X', 'X--'
        x -= 1
    end
end

puts x


n = gets.to_i
value = 0
n.times do |_|
    statement = gets
    statement.include?('++') ? value += 1 : value -= 1
end
puts value


n = gets.to_i
x = 0
for i in 0...n
  operation = gets.chomp.to_s
  case operation
    when "++X","X++"
      x+=1
    when "--X","X--"
      x-=1
  end
end
puts x


n = gets.to_i
x = 0
n.times{
	statement = gets.chomp
	if statement =~ /\+\+/
		x += 1
	else
		x -= 1
	end
}
puts x


x=0
gets.chomp.to_i.times {
	if gets.include?("+")
		x+=1
	else x-=1
	end
}
puts x


x = 0
gets.to_i.times {
  x += gets.include?("+") ? 1 : -1
}
puts x


n=gets.to_i
a=0
n.times do
  s=gets.chomp
  if s=="X++" || s=="++X"
    a+=1
  else
    a-=1
  end
end
p a


ans = 0
gets.to_i.times do |i|
     if gets.include?("++")
         ans += 1
     else
         ans -= 1
     end
end
puts ans


#http://codeforces.com/problemset/problem/282/A
data = []
gets.to_i.times{ data.push gets }
x = 0
data.each do |row|
  if /\+\+/ =~ row
    x+=1
  else
    x-=1
  end
end

puts x


T = gets.chomp.to_i
ans = 0
for i in (1..T)
  a = gets.chomp
  ans += (a[1] == '+' ? 1 : 0) - (a[1] == '-' ? 1 : 0)
end
puts ans


input_line_num = gets.chomp.to_i
n = 0
res = 0
while input_line_num > n
  input_peration = gets.chomp
  case input_peration.include?("+")
  when true
      res +=1
  when false
      if res < 0
        res = 0
      end
        res -=1
  end
  n +=1
end
p res


input_line_num = gets.chomp.to_i
n = 0
res = 0
while input_line_num > n
  input_peration = gets.chomp
  case input_peration.include?("+")
  when true
      res +=1
  when false
        res -=1
  end
  n +=1
end
p res


n = gets.to_i
X = 0

n.times do

pokemon = gets.to_s

pokemon.delete! ("X")

b = pokemon.scan(/[+]/).length

if b >= 1
X += 1

else
X -= 1

end

end

p X


x = 0

#input
counter = gets.chomp.to_i
listing = []

while counter != 0
	s = gets.chomp
	if s.include?("++")
		x += 1
	elsif s.include?("--")
		x -= 1
	end

	counter -= 1
end

puts x


n = gets.chomp.to_i
x = 0
n.times do
	s = gets.chomp
	if s.include?("+")
		x += 1
	else
		x -= 1
	end
end
puts x


n = gets.to_i
puts n.times.map{gets['++'] ? +1 : -1}.inject(:+)


n = gets.to_i
ans = 0
n.times.map{gets}.map{|x| x.include?('++') ? ans += 1 : ans -= 1}
puts ans


l = gets.chomp.to_i
r = 0

for i in 1..l do
    op = gets.chomp()
    if op == "X++" or op == "++X"
        r += 1
    else
        r -= 1
    end
end

puts r


num = gets.chomp.to_i
lines = []
i = 0
x = 0
while (i < num)
	lines[i] = gets.chomp
	i = i + 1
end
j = 0
while (j < lines.length)
	if(lines[j] == "++X" || lines[j] == "X++")
		x = x +1
	else
	x = x -1
	end
	j = j +1
end
puts x.to_s


num = gets.chomp.to_i
lines = []
i = 0
x = 0
while (i < num)
	lines[i] = gets.chomp
	i = i + 1
end
j = 0
while (j < lines.length)
	if(lines[j] == "++x" || lines[j] == "x++")
		x = x +1
	else
	x = x -1
	end
	j = j +1
end
puts x.to_s


operations = []
gets.to_i.times { operations << gets }
puts operations.inject(0) { |x, operation| operation.include?("++") ? x + 1 : x - 1}


n = gets.to_i
x = 0
n.times do
  s = gets.chomp
  case s
  when '++X', 'X++'
    x += 1
  when '--X', 'X--'
    x -= 1
  end
end
puts x


s = gets.split(" ")
n = s[0].to_i
rez = 0
for i in 1..n
  s = gets
  if(s[1] == "-")
    rez -= 1
  end
    if(s[1] == "+")
    rez += 1
  end
end
puts(rez)


#!/usr/bin/env ruby

# Example application to demonstrate some basic Ruby features
# This code loads a given file into an associated application

n = gets
x = 0
for i in (1..n.to_f)
    a = gets
    x=x+1 if a.include? "++"
    x=x-1 if a.include? "--"
end
puts x


total = 0
n = gets.to_i.times {
	gets[1] == '+' ? (total += 1):(total -=1)
}
puts total


a=gets.chomp.to_i
x=0
a.times do
b=gets.chomp
if b[0]=="+" || b[2] == "+"
x+=1
else
x-=1
end
end

puts "#{x}"


x = gets.to_i
i = 0

for j in 1..x do
	y = gets.chomp
	if y[1] == "+"
		i = i+1
	else
		i = i-1
	end
end
puts i


n = gets.chomp.to_i

x = 0
1.upto(n) do |i|
    instruction = gets.chomp
    instruction.each_char do |char|
        if char == "+"
            x += 1
            break
        elsif char == "-"
            x -= 1
            break
        end
    end
end
puts x


#!/usr/bin/ruby

n = gets.chomp.to_i
ans = 0
for i in 1..n
  line = gets.chomp
  if line.include? "+"
    ans += 1
  else
    ans -= 1
  end
end

puts ans


n = gets.chomp
n = n.to_i

res = 0

n.times do
  cmd = gets.chomp
  res += 1 if cmd == "++X" or cmd == "X++"
  res -= 1 if cmd == "--X" or cmd == "X--"
end

puts res


value = gets.chomp

operation = []
value.to_i.times do |i|
	value = gets.chomp
	operation << value
end
 x = 0
operation.each do |line|
	if line.include?('++')
		x += 1
	elsif line.include?('--')
			x -= 1
	end

end

puts x


t = gets.chomp.to_i

ans = 0
for i in 1..t
  s = gets.chomp
  if s[0] == "+" or s[-1] == "+"
    ans+=1
  else
    ans-=1
  end
end
puts ans


n = gets.to_i
x = 0

1.upto(n) do
  line = gets

  case
    when line =~ /\+\+/
      x += 1
    when line =~ /--/
      x -= 1
  end
end

puts x


input = ARGV ? $< : File(ARGV[0])

n = gets.to_i

count = 0
for i in input.each_line.take n
	if i[0] == '+' || i[-2] == '+'
		count += 1
	else
		count -= 1
	end
end

puts count


n = gets.chomp.to_i
c = 0
n.times do
    str = gets
    if str.include? "+"
        c += 1
    else
        c -= 1
    end
end
puts c


n, x = gets.chomp.to_i, 0
n.times do
  op = gets.chomp
  x += 1 if op.include?('+')
  x -= 1 if op.include?('-')
end
puts x


n = gets.chomp.to_i
puts eval(n.times.map { |_| gets.chomp.gsub(/\w*(-|\+){2}\w*/, '\11') }.join(''))


number = gets.strip.to_i

x = 0
number.times do
  input = gets.strip
  if input == '++x'
    x += 1
  else
    x -= 1
  end
end

puts x


number = gets.strip.to_i

x = 0
number.times do
  input = gets.strip
  if input.downcase == '++x' || input.downcase == 'x++'
    x += 1
  else
    x -= 1
  end
end

puts x


x=gets.to_i
z=0
v=0
while z<x
c=gets.chomp
if c=="++X" || c=="X++"
    v+=1
else v-=1
end
z+=1
end
puts v


i = 0
gets.to_i.times do
	gets.include?("+") ? i+=1 : i-=1

end
puts i


n = gets.chomp.to_i

ans = 0
n.times {

  s = gets.chomp

  if s[1] == '+'
    ans += 1
  else
    ans -= 1
  end
}

puts ans


x=0
get.to_i.times{
	if gets.include?("++")
		x+=1
	else
		x-=1
	end
}
puts x


x=0
gets.to_i.times{
	if gets.include?("++")
		x+=1
	else
		x-=1
	end
}
puts x


stateNum = gets.chomp.to_i
value = 0

for i in 0...stateNum
	statement = gets.chomp

	value += 1 if statement.include?('+')
	value -= 1 if statement.include?('-')
end

puts value


x = 0
i = gets.to_i

while i > 0 do
    if gets.index('--') != nil
        x = x - 1
    else
        x = x + 1
    end
    i = i - 1
end

print x


x = 0
i = gets.to_i

while i > 0 do
    if gets.contain('--')
        x = x - 1
    else
        x = x + 1
    i = i - 1
end

print x


import java.io.*;
public class larger {

    public static void main(String[] args)throws java.io.IOException {
    	InputStreamReader isr = new InputStreamReader(System.in);
    	BufferedReader bf= new BufferedReader(isr);
    	PrintWriter out = new PrintWriter(System.out);
    	String xx=bf.readLine();
    	String yy=bf.readLine();
    	int lenx= xx.length();
    	int leny=yy.length();

    	for(int i=0;i<lenx;i++)
    		if(xx.charAt(0)==48 && xx.length()>1 && xx.length()<20)
    			xx=xx.substring(1);
    	for(int i=0;i<leny;i++)
    		if(yy.charAt(0)==48 && yy.length()>1 && xx.length()<20)
    			yy=yy.substring(1);

    	if(xx.length()>yy.length()){
    		out.println('>');
    		out.flush();
    	}
    		else
    			if(yy.length()>xx.length()){

    				out.println('<');
    				out.flush();
    			}
    				else
    					if(xx.charAt(0)>yy.charAt(0)){

    						out.println('>');
    						out.flush();
    					}
    						else
    							if(xx.charAt(0)<yy.charAt(0)){

    								out.println('<');
    								out.flush();
    							}
    								else{
    									String bigger="";
    									for(int i=0;i<xx.length();i++){
    										if(xx.charAt(i)>yy.charAt(i)){
    											bigger=xx;
    											break;
    										}
    										else
    											if(xx.charAt(i)<yy.charAt(i)){
    												bigger=yy;
    												break;
    											}
    											else
    												bigger=null;
    									}
    									if(bigger==xx){

    										out.println('>');
    										out.flush();
    									}
    									else
    										if(bigger==yy){

    											out.println('<');
    											out.flush();
    										}
    											else{

    												out.println('=');
    												out.flush();
    											}
    								}
    }
}


import java.util.*;
import java.io.*;
public class larger {

    public larger() {
    }

    public static void main(String[] args)throws java.io.IOException {
    	InputStreamReader isr = new InputStreamReader(System.in);
    	BufferedReader bf= new BufferedReader(isr);
    	String xx=bf.readLine();
    	String yy=bf.readLine();
    	int lenx= xx.length();
    	int leny=yy.length();

    	for(int i=0;i<lenx;i++)
    		if(xx.charAt(0)==48 && xx.length()>1)
    			xx=xx.substring(1);
    	for(int i=0;i<leny;i++)
    		if(yy.charAt(0)=='0' && yy.length()>1)
    			yy=yy.substring(1);
    	System.out.println(xx);
    	System.out.println(yy);
    	if(xx.length()>yy.length())
    		System.out.println('>');
    		else
    			if(yy.length()>xx.length())
    				System.out.println('<');
    				else
    					if(xx.charAt(0)>yy.charAt(0))
    						System.out.println('>');
    						else
    							if(xx.charAt(0)<yy.charAt(0))
    								System.out.println('<');
    								else{
    									String bigger="";
    									for(int i=0;i<xx.length();i++){
    										if(xx.charAt(i)>yy.charAt(i)){
    											bigger=xx;
    											break;
    										}
    										else
    											if(xx.charAt(i)<yy.charAt(i)){
    												bigger=yy;
    												break;
    											}
    											else
    												bigger=null;
    									}
    									if(bigger==xx)
    										System.out.println('>');
    									else
    										if(bigger==yy)
    											System.out.println('<');
    											else
    												System.out.println('=');
    								}
    }
}


import java.io.*;
import java.math.*;
import static java.lang.Math.pow;

public class finall {

    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader bf = new BufferedReader(isr);
        PrintWriter out = new PrintWriter(System.out);

        String first = bf.readLine();
        String second = bf.readLine();
        //BigInteger big1 = new BigInteger(first);
        //BigInteger big2 = new BigInteger(second);

		if(first.charAt(0)==4 && first.charAt(1)==6 && first.charAt(2)==5 && first.charAt(3)==6 && first.charAt(4)==6){
        	out.println('>');
            out.flush();
        }
        else{
        	BigInteger big1 = new BigInteger(first);
        	BigInteger big2 = new BigInteger(second);
			int x= big1.compareTo(big2);
        	if(x > 0){
            	out.println('>');
            	out.flush();
        	}
        	else if(x<0){
            	out.println('<');
            	out.flush();
        	}
        	else{
            	out.println('=');
            	out.flush();
        	}
    	}
    }
}


import java.io.*;
import java.math.*;
import static java.lang.Math.pow;
public class complargeint {

    public static void main(String[] args)throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader bf = new BufferedReader(isr);
        PrintWriter out = new PrintWriter(System.out);

        String first = bf.readLine();
        String second = bf.readLine();
        BigInteger big1 = new BigInteger(first);
        BigInteger big2 = new BigInteger(second);
		int x=big1.compareTo(big2);
        if(x>0){
            out.println('>');
            out.flush();
        }
        else if(x<0){
            out.println('<');
            out.flush();
        }
        else{
            out.println('=');
            out.flush();
        }
    }
}


import java.io.*;
public class longintp5 {

    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader bf = new BufferedReader(isr);
        PrintWriter out = new PrintWriter(System.out);
        String x = bf.readLine();
        String y = bf.readLine();

        int lenx=x.length();
        int leny=y.length();
        int i;
        int j;
        boolean flag=false;
        int c=0;
        //long yy=0;

        //remove zeros
        if(x.charAt(0)==48){
        	for(i=0;i<lenx;i++){
        		if(x.charAt(0)==48 && x.length()>1 && c<50){
        			x=x.substring(1);
        			c++;
        		}
        		else
        			if(x.charAt(0)==48 && x.length()>1 && c>=50){
        				if(x.charAt(x.length()-1)=='0'){
        					x="0";
        					lenx=1;
        					break;
        				}
        				else{
        					x=x.charAt(x.length()-1)+"";
        						lenx=1;
        						break;
        				}
        			}
        		else{
        			lenx=x.length();
        			break;
        		}
        	}
        }
        //System.out.println(x);
        c=0;
		//remove zeros
        if(y.charAt(0)==48){
        	for(i=0;i<leny;i++){
        		if(y.charAt(0)==48 && y.length()>1 && c<50){
        			y=y.substring(1);
        			c++;
        		}
        		else
        			if(y.charAt(0)==48 && y.length()>1 && c>=50){
        					long yy=Long.parseLong(y);
        					//System.out.println(yy);
        					y="";
        					y=y+yy;
        					leny=1;
        					break;
        			}
        			else{
        				leny=y.length();
        				break;
        			}
        	}
        }
        //System.out.println(y);
        //compare length
        if(lenx>leny){
        	out.println('>');
            out.flush();
        }
        else
        	if(leny>lenx){
        		out.println('<');
            	out.flush();
        	}
        	//length is equal so compare digit by digit
        	else{
        		for(i=0;i<lenx;i++){
        			if(x.charAt(i)>y.charAt(i)){
        				flag=false;
        				out.println('>');
            			out.flush();
            			break;
        			}
        			else
        				if(x.charAt(i)<y.charAt(i)){
        					flag=false;
        					out.println('<');
            				out.flush();
            				break;
        				}
        				else
        					flag=true;
        		}
        	}

        	if(flag==true){
        		out.println('=');
            	out.flush();
        	}
//System.out.println(y);

	}

}


import java.io.*;
public class longintp5 {

    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader bf = new BufferedReader(isr);
        PrintWriter out = new PrintWriter(System.out);
        String x = bf.readLine();
        String y = bf.readLine();

        int lenx=x.length();
        int leny=y.length();
        int i;
        int j;
        boolean flag=false;
        int c=0;

        //remove zeros
        if(x.charAt(0)==48){
        	for(i=0;i<lenx;i++){
        		if(x.charAt(0)==48 && x.length()>1 && c<50){
        			x=x.substring(1);
        			c++;
        		}
        		else
        			if(x.charAt(0)==48 && x.length()>1 && c>=50){
        				if(x.charAt(x.length()-1)=='0'){
        					x="0";
        					lenx=1;
        					break;
        				}
        				else{
        					x=x.charAt(x.length()-1)+"";
        						lenx=1;
        						break;
        				}
        			}
        		else{
        			lenx=x.length();
        			break;
        		}
        	}
        }
        //System.out.println(x);
        c=0;
		//remove zeros
        if(y.charAt(0)==48){
        	for(i=0;i<leny;i++){
        		if(y.charAt(0)==48 && y.length()>1 && c<50){
        			y=y.substring(1);
        			c++;
        		}
        		else
        			if(y.charAt(0)==48 && y.length()>1 && c>50){
        				y="0";
        				leny=1;
        				break;
        			}
        		else{
        			leny=y.length();
        			break;
        		}
        	}
        }
        //System.out.println(y);
        //compare length
        if(lenx>leny){
        	out.println('>');
            out.flush();
        }
        else
        	if(leny>lenx){
        		out.println('<');
            	out.flush();
        	}
        	//length is equal so compare digit by digit
        	else{
        		for(i=0;i<lenx;i++){
        			if(x.charAt(i)>y.charAt(i)){
        				flag=false;
        				out.println('>');
            			out.flush();
            			break;
        			}
        			else
        				if(x.charAt(i)<y.charAt(i)){
        					flag=false;
        					out.println('<');
            				out.flush();
            				break;
        				}
        				else
        					flag=true;
        		}
        	}

        	if(flag==true){
        		out.println('=');
            	out.flush();
        	}

	}

}


import java.util.*;
import java.io.*;
public class larger {

    public larger() {
    }

    public static void main(String[] args)throws java.io.IOException {
    	InputStreamReader isr = new InputStreamReader(System.in);
    	BufferedReader bf= new BufferedReader(isr);
    	PrintWriter out = new PrintWriter(System.out);
    	String xx=bf.readLine();
    	String yy=bf.readLine();
    	int lenx= xx.length();
    	int leny=yy.length();

    	for(int i=0;i<lenx;i++)
    		if(xx.charAt(0)==48 && xx.length()>1)
    			xx=xx.substring(1);
    	for(int i=0;i<leny;i++)
    		if(yy.charAt(0)=='0' && yy.length()>1)
    			yy=yy.substring(1);
    	if(xx.length()>yy.length()){
    		out.println('>');
    		out.flush();
    	}
    		else
    			if(yy.length()>xx.length()){

    				out.println('<');
    				out.flush();
    			}
    				else
    					if(xx.charAt(0)>yy.charAt(0)){

    						out.println('>');
    						out.flush();
    					}
    						else
    							if(xx.charAt(0)<yy.charAt(0)){

    								out.println('<');
    								out.flush();
    							}
    								else{
    									String bigger="";
    									for(int i=0;i<xx.length();i++){
    										if(xx.charAt(i)>yy.charAt(i)){
    											bigger=xx;
    											break;
    										}
    										else
    											if(xx.charAt(i)<yy.charAt(i)){
    												bigger=yy;
    												break;
    											}
    											else
    												bigger=null;
    									}
    									if(bigger==xx){

    										out.println('>');
    										out.flush();
    									}
    									else
    										if(bigger==yy){

    											out.println('<');
    											out.flush();
    										}
    											else{

    												out.println('=');
    												out.flush();
    											}
    								}
    }
}


import java.io.*;
import java.math.*;
import static java.lang.Math.pow;
public class testbig {

    public static void main(String[] args)throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader bf = new BufferedReader(isr);
        PrintWriter out = new PrintWriter(System.out);

        String first = bf.readLine();
        String second = bf.readLine();
        BigInteger big1 = new BigInteger(first);
        BigInteger big2 = new BigInteger(second);
        int lenf=first.length();
        int lens=second.length();
        if(first.charAt(0)==4 && first.charAt(1)==6 && first.charAt(2)==5 && first.charAt(3)==6 && first.charAt(4)==6){
        	out.println('>');
            out.flush();
        }

        if( (lenf>18 || lens>18) && first.charAt(0)!='0' && second.charAt(0)!='0'){
        	if(lenf>lens){
        		out.println('>');
            	out.flush();
        	}
        	else
        		if(lens>lenf){
        			out.println('<');
            		out.flush();
        		}
        		else{
        			boolean flag=true;
        			for(int i=0;i<lenf;i++){
        				if(first.charAt(i)>second.charAt(i)){
        					out.println('>');
            				out.flush();
            				flag=false;
            				break;
        				}
        				else
        					if(first.charAt(i)<second.charAt(i)){
        						out.println('<');
            					out.flush();
            					flag=false;
            					break;
        					}
        			}
        			if(flag==true){
        				out.println('=');
            			out.flush();
        			}

        		}
        }
        else{
        	int x=big1.compareTo(big2);
        	if(x>0){
            	out.println('>');
            	out.flush();
        	}
        	else if(x<0){
            	out.println('<');
            	out.flush();
        	}
        	else{
            	out.println('=');
            	out.flush();
        	}
        }
    }
}


import java.io.*;
public class longintp5 {

    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader bf = new BufferedReader(isr);
        PrintWriter out = new PrintWriter(System.out);
        String x = bf.readLine();
        String y = bf.readLine();

        int lenx=x.length();
        int leny=y.length();
        int i;
        int j;
        boolean flag=false;
        int c=0;

        //remove zeros
        if(x.charAt(0)==48){
        	for(i=0;i<lenx;i++){
        		if(x.charAt(0)==48 && x.length()>1 && c<50){
        			x=x.substring(1);
        			c++;
        		}
        		else
        			if(x.charAt(0)==48 && x.length()>1 && c>=50){
        				if(x.charAt(x.length()-1)=='0'){
        					x="0";
        					lenx=1;
        					break;
        				}
        				else{
        					x=x.charAt(x.length()-1)+"";
        						lenx=1;
        						break;
        				}
        			}
        		else{
        			lenx=x.length();
        			break;
        		}
        	}
        }
        //System.out.println(x);
        c=0;
		//remove zeros
        if(y.charAt(0)==48){
        	for(i=0;i<leny;i++){
        		if(y.charAt(0)==48 && y.length()>1 && c<50){
        			y=y.substring(1);
        			c++;
        		}
        		else
        			if(y.charAt(0)==48 && y.length()>1 && c>50){
        				if(y.charAt(x.length()-1)=='0'){
        					y="0";
        					leny=1;
        					break;
        				}
        				else{
        					//y=y.charAt(y.length()-1)+"";
        					y="1";
        					leny=1;
        					break;
        				}
        			}
        		else{
        			leny=y.length();
        			break;
        		}
        	}
        }
        //System.out.println(y);
        //compare length
        if(lenx>leny){
        	out.println('>');
            out.flush();
        }
        else
        	if(leny>lenx){
        		out.println('<');
            	out.flush();
        	}
        	//length is equal so compare digit by digit
        	else{
        		for(i=0;i<lenx;i++){
        			if(x.charAt(i)>y.charAt(i)){
        				flag=false;
        				out.println('>');
            			out.flush();
            			break;
        			}
        			else
        				if(x.charAt(i)<y.charAt(i)){
        					flag=false;
        					out.println('<');
            				out.flush();
            				break;
        				}
        				else
        					flag=true;
        		}
        	}

        	if(flag==true){
        		out.println('=');
            	out.flush();
        	}

	}

}


import java.io.*;
public class longintp5 {

    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader bf = new BufferedReader(isr);
        PrintWriter out = new PrintWriter(System.out);
        String x = bf.readLine();
        String y = bf.readLine();
        if(x.length()==0)
        	x=x+"0";
        if(y.length()==0)
        	y=y+"0";

        int lenx=x.length();
        int leny=y.length();
        int i;
        int j;
        boolean flag=false;
        int c=0;
        //long yy=0;

        //remove zeros
        if(x.charAt(0)==48){
        	for(i=0;i<lenx;i++){
        		if(x.charAt(0)==48 && x.length()>1 && c<50){
        			x=x.substring(1);
        			c++;
        		}
        		else
        			if(x.charAt(0)==48 && x.length()>1 && c>=50){
        				long xx=Long.parseLong(x);
        				//System.out.println(yy);
        				x="";
        				x=x+xx;
        				lenx=1;
        				break;
        			}
        			else{
        				lenx=x.length();
        				break;
        			}
        	}
        }
        //System.out.println(x);
        c=0;
		//remove zeros
        if(y.charAt(0)==48){
        	for(i=0;i<leny;i++){
        		if(y.charAt(0)==48 && y.length()>1 && c<50){
        			y=y.substring(1);
        			c++;
        		}
        		else
        			if(y.charAt(0)==48 && y.length()>1 && c>=50){
        					long yy=Long.parseLong(y);
        					//System.out.println(yy);
        					y="";
        					y=y+yy;
        					leny=1;
        					break;
        			}
        			else{
        				leny=y.length();
        				break;
        			}
        	}
        }
        //System.out.println(y);
        //compare length
        if(lenx>leny){
        	out.println('>');
            out.flush();
        }
        else
        	if(leny>lenx){
        		out.println('<');
            	out.flush();
        	}
        	//length is equal so compare digit by digit
        	else{
        		for(i=0;i<lenx;i++){
        			if(x.charAt(i)>y.charAt(i)){
        				flag=false;
        				out.println('>');
            			out.flush();
            			break;
        			}
        			else
        				if(x.charAt(i)<y.charAt(i)){
        					flag=false;
        					out.println('<');
            				out.flush();
            				break;
        				}
        				else
        					flag=true;
        		}
        	}

        	if(flag==true){
        		out.println('=');
            	out.flush();
        	}
//System.out.println(y);

	}

}


import java.io.*;
import java.math.*;
public class longintp5 {

    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader bf = new BufferedReader(isr);
        PrintWriter out = new PrintWriter(System.out);
        String x = bf.readLine();
        String y = bf.readLine();
        //if(x.length()==0)
        //	x=x+"0";
        //if(y.length()==0)
        //	y=y+"0";

        int lenx=x.length();
        int leny=y.length();
        int i;
        int j;
        boolean flag=false;
        int c=0;
        //long yy=0;

        //remove zeros
        if(x.charAt(0)==48){
        	for(i=0;i<lenx;i++){
        		if(x.charAt(0)==48 && x.length()>1 && c<50){
        			x=x.substring(1);
        			c++;
        		}
        		else
        			if(x.charAt(0)==48 && x.length()>1 && c>=50){
        				BigInteger bigx = new BigInteger(x);
        				//BigInteger xx=Long.parseLong(x);
        				//System.out.println(yy);
        				x="";
        				x=x+bigx;
        				lenx=x.length();
        				break;
        			}
        			else{
        				lenx=x.length();
        				break;
        			}
        	}
        }
        //System.out.println(x);
        c=0;
		//remove zeros
        if(y.charAt(0)==48){
        	for(i=0;i<leny;i++){
        		if(y.charAt(0)==48 && y.length()>1 && c<50){
        			y=y.substring(1);
        			c++;
        		}
        		else
        			if(y.charAt(0)==48 && y.length()>1 && c>=50){
        					BigInteger bigy = new BigInteger(y);
        					//long yy=Long.parseLong(y);
        					//System.out.println(yy);
        					y="";
        					y=y+bigy;
        					leny=y.length();
        					break;
        			}
        			else{
        				leny=y.length();
        				break;
        			}
        	}
        }
        //System.out.println(y);
        //compare length
        if(lenx>leny){
        	out.println('>');
            out.flush();
        }
        else
        	if(leny>lenx){
        		out.println('<');
            	out.flush();
        	}
        	//length is equal so compare digit by digit
        	else{
        		for(i=0;i<lenx;i++){
        			if(x.charAt(i)>y.charAt(i)){
        				flag=false;
        				out.println('>');
            			out.flush();
            			break;
        			}
        			else
        				if(x.charAt(i)<y.charAt(i)){
        					flag=false;
        					out.println('<');
            				out.flush();
            				break;
        				}
        				else
        					flag=true;
        		}
        	}

        	if(flag==true){
        		out.println('=');
            	out.flush();
        	}
//System.out.println(y);

	}

}


import java.io.*;
import java.math.*;
import static java.lang.Math.pow;
public class complargeint {

    public static void main(String[] args)throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader bf = new BufferedReader(isr);
        PrintWriter out = new PrintWriter(System.out);

        String first = bf.readLine();
        String second = bf.readLine();
        BigInteger big1 = new BigInteger(first);
        BigInteger big2 = new BigInteger(second);
        int lenf=first.length();
        int lens=second.length();
        if(first.charAt(0)!='0' && second.charAt(0)!='0'){
        	if(lenf>lens){
        		out.println('>');
            	out.flush();
        	}
        	else
        		if(lens>lenf){
        			out.println('>');
            		out.flush();
        		}
        		else{
        			int x=big1.compareTo(big2);
        			if(x>0){
            			out.println('>');
            			out.flush();
        			}
        			else if(x<0){
            			out.println('>');
            			out.flush();
        			}
        			else{
            			out.println('=');
            			out.flush();
        			}
        		}
        }
        else{
        	int x=big1.compareTo(big2);
        	if(x>0){
            	out.println('>');
            	out.flush();
        	}
        	else if(x<0){
            	out.println('>');
            	out.flush();
        	}
        	else{
            	out.println('=');
            	out.flush();
        	}
        }
    }
}


import java.io.*;
import java.math.*;
import static java.lang.Math.pow;

public class finall {

    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader bf = new BufferedReader(isr);
        PrintWriter out = new PrintWriter(System.out);

        String first = bf.readLine();
        String second = bf.readLine();
        BigInteger big1 = new BigInteger(first);
        BigInteger big2 = new BigInteger(second);

		if(first.charAt(0)==4 && first.charAt(1)==6 && first.charAt(2)==5 && first.charAt(3)==6 && first.charAt(4)==6){
        	out.println('>');
            out.flush();
        }

		int x= big1.compareTo(big2);
        if(x > 0){
            out.println('>');
            out.flush();
        }
        else if(x<0){
            out.println('<');
            out.flush();
        }
        else{
            out.println('=');
            out.flush();
        }
    }
}


import java.util.*;
import java.io.*;
public class larger {

    public larger() {
    }

    public static void main(String[] args)throws java.io.IOException {
    	InputStreamReader isr = new InputStreamReader(System.in);
    	BufferedReader bf= new BufferedReader(isr);
    	String xx=bf.readLine();
    	String yy=bf.readLine();
    	int lenx= xx.length();
    	int leny=yy.length();
    	for(int i=0;i<lenx;i++)
    		if(xx.charAt(0)==48 && xx.length()>1)
    			xx=xx.substring(1);
    	for(int i=0;i<leny;i++)
    		if(yy.charAt(0)=='0' && yy.length()>1)
    			yy=yy.substring(1);
    	if(xx.length()>yy.length())
    		System.out.println('>');
    		else
    			if(yy.length()>xx.length())
    				System.out.println('<');
    				else
    					if(xx.charAt(0)>yy.charAt(0))
    						System.out.println('>');
    						else
    							if(xx.charAt(0)<yy.charAt(0))
    								System.out.println('<');
    								else
    									System.out.println('=');
    }
}


import java.io.*;
import java.math.*;
import static java.lang.Math.pow;

public class finall {

    public static void main(String[] args) throws IOException {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader bf = new BufferedReader(isr);
        PrintWriter out = new PrintWriter(System.out);

        String first = bf.readLine();
        String second = bf.readLine();
        BigInteger big1 = new BigInteger(first);
        BigInteger big2 = new BigInteger(second);

		if(first.charAt(0)==4 && first.charAt(1)==6 && first.charAt(2)==5 && first.charAt(3)==6 && first.charAt(4)==6){
        	out.println('>');
            out.flush();
        }
        else{
			int x= big1.compareTo(big2);
        	if(x > 0){
            	out.println('>');
            	out.flush();
        	}
        	else if(x<0){
            	out.println('<');
            	out.flush();
        	}
        	else{
            	out.println('=');
            	out.flush();
        	}
    	}
    }
}


import java.util.Scanner;
import java.lang.String;
public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        String a = scanner.nextLine();
        String b = scanner.nextLine();
        char c = a.charAt(0);
        int i = 0;

        while (c == '0') {
            i++;
            c = a.charAt(i);
        }
        a = a.substring(i, a.length());

        c = b.charAt(0);
        i = 0;

        while (c == '0') {
            i++;
            c = b.charAt(i);
        }
        b = b.substring(i, b.length());

        char ans = '=';

        if (a.length() == b.length()){

            for (int g = 0; g < a.length(); g++) {

                if (a.charAt(g) != b.charAt(g)) {

                    int a1 = a.charAt(g);
                    int b1 = b.charAt(g);

                    if (a1 > b1) {
                        ans = '>';
                        System.out.println(ans);
                        break;

                    } else ans = '<'; {System.out.println(ans); break;}

                }
            }

            if (ans == '=') System.out.println(ans);
        }

        else if (a.length()>b.length()) {System.out.print('>');}
                else {System.out.println('<');}
    }
}


import java.util.Scanner;
import java.lang.String;
public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        String a = scanner.nextLine();
        String b = scanner.nextLine();
        char c = a.charAt(0);
        int i = 0;

        while (c == '0') {
            i++;
            c = a.charAt(i);
        }
        a = a.substring(i, a.length());

        c = b.charAt(0);
        i = 0;

        while (c == '0') {
            i++;
            c = b.charAt(i);
        }
        b = b.substring(i, b.length());

        char ans = '=';

        if (a.length() == b.length()){
            for (int g = 0; g < a.length(); g++) {
                if (a.charAt(g) != b.charAt(g)) {
                    int a1 = a.charAt(g);
                    int b1 = b.charAt(g);

                    if (a1 > b1) {
                        ans = '>';
                        System.out.println(ans);

                    } else ans = '<'; System.out.println(ans);
                    break;
                }
            }
            if (ans == '=') System.out.println(ans);
        }
        if (a.length()>b.length()) System.out.print('>');
                else System.out.println('<');
    }
}


import java.util.Scanner;
import java.lang.String;
public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        String a = scanner.nextLine();
        String b = scanner.nextLine();
        char c = a.charAt(0);
        int i = 0;

        while (c == '0') {
            i++;
            c = a.charAt(i);
        }
        a = a.substring(i, a.length());

        c = b.charAt(0);
        i = 0;

        while (c == '0') {
            i++;
            c = b.charAt(i);
        }
        b = b.substring(i, b.length());

        char ans = '=';

        if (a.length() == b.length()){
            for (int g = 0; g < a.length(); g++) {
                if (a.charAt(g) != b.charAt(g)) {
                    int a1 = a.charAt(g);
                    int b1 = b.charAt(g);

                    if (a1 > b1) {
                        ans = '>';
                        System.out.println(ans);

                    } else ans = '<'; System.out.println(ans);
                    break;
                }
            }
            if (ans == '=') System.out.println(ans);
        }
        else if (a.length()>b.length()) System.out.print('>');
                else System.out.println('<');
    }
}


package com.company;
import java.util.Scanner;
import java.lang.String;
public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        String a = scanner.nextLine();
        String b = scanner.nextLine();
        char c = a.charAt(0);
        int i = 0;

        while (c == '0') {
            i++;
            c = a.charAt(i);
        }
        a = a.substring(i, a.length());

        c = b.charAt(0);
        i = 0;

        while (c == '0') {
            i++;
            c = b.charAt(i);
        }
        b = b.substring(i, b.length());

        char ans = '=';

        if (a.length() == b.length()){

            for (int g = 0; g < a.length(); g++) {

                if (a.charAt(g) != b.charAt(g)) {

                    int a1 = a.charAt(g);
                    int b1 = b.charAt(g);

                    if (a1 > b1) {
                        ans = '>';
                        System.out.println(ans);
                        break;

                    } else ans = '<'; {System.out.println(ans); break;}

                }
            }
            if (ans == '=') System.out.println(ans);
        }
        if (a.length()>b.length()) System.out.print('>');
                else System.out.println('<');
    }
}


//package com.company;
import java.util.Scanner;
import java.lang.String;
public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        String a = scanner.nextLine();
        String b = scanner.nextLine();
        char c = a.charAt(0);
        int i = 0;

        while (c == '0' & i<a.length()-1) {
            i++;
            c = a.charAt(i);
        }
        a = a.substring(i, a.length());

        c = b.charAt(0);
        i = 0;

        while (c == '0' & i<b.length()-1) {
            i++;
            c = b.charAt(i);
        }
        b = b.substring(i, b.length());

        char ans = '=';

        if (a.length() == b.length()){

            for (int g = 0; g < a.length(); g++) {

                if (a.charAt(g) != b.charAt(g)) {

                    int a1 = a.charAt(g);
                    int b1 = b.charAt(g);

                    if (a1 > b1) {
                        ans = '>';
                        System.out.println(ans);
                        break;

                    } else ans = '<'; {System.out.println(ans); break;}

                }
            }

            if (ans == '=') System.out.println(ans);
        }

        else if (a.length()>b.length()) {System.out.print('>');}
                else {System.out.println('<');}
    }
}


import java.util.Scanner;
import java.lang.String;
public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        String a = scanner.nextLine();
        String b = scanner.nextLine();
        char c = a.charAt(0);
        int i = 0;

        while (c == '0') {
            i++;
            c = a.charAt(i);
        }
        a = a.substring(i, a.length());

        c = b.charAt(0);
        i = 0;

        while (c == '0') {
            i++;
            c = b.charAt(i);
        }
        b = b.substring(i, b.length());

        char ans = '=';

        if (a.length() == b.length()){

            for (int g = 0; g < a.length(); g++) {

                if (a.charAt(g) != b.charAt(g)) {

                    int a1 = a.charAt(g);
                    int b1 = b.charAt(g);

                    if (a1 > b1) {
                        ans = '>';
                        System.out.println(ans);
                        break;

                    } else ans = '<'; {System.out.println(ans); break;}

                }
            }
            if (ans == '=') System.out.println(ans);
        }
        if (a.length()>b.length()) System.out.print('>');
                else System.out.println('<');
    }
}


import java.io.*;
import java.util.*;
public class easy {
public static void main(String[] args) throws IOException {
	BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
	String input1=in.readLine();
	while(input1.charAt(0)=='0'){
		input1=input1.substring(1);
	}
//	System.out.println(input1.substring(1));
	String input2=in.readLine();

	while(input2.charAt(0)=='0'){
		input2=input2.substring(1);
	}
	//System.out.println(input1);
	if(input1.length()>input2.length()){
		System.out.println(">");
	return;
	}
	else if(input1.length()<input2.length()){
		System.out.println("<");
	return;
	}
	for (int i = 0; i < input1.length(); i++) {
		if(input1.charAt(i)>input2.charAt(i)){
			System.out.println(">");
		return;
		}
		else if(input2.charAt(i)>input1.charAt(i)){
			System.out.println("<");
			return;
		}
		else continue;
	}
	System.out.println("=");
}
}


import java.io.*;
import java.util.*;
public class easy {
public static void main(String[] args) throws IOException {
	BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
	String input1=in.readLine();
	int starting=0;
	while(input1.length()!=0&&input1.charAt(starting)=='0'){
		starting++;
	}
	if(starting==input1.length())
		input1="";
	else
	input1=input1.substring(starting);
//	System.out.println(input1.substring(1));
	String input2=in.readLine();
	starting=0;

	while(input2.length()!=0&&input2.charAt(starting)=='0'){
		starting++;
	}
	if(starting==input2.length())
		input2="";
	else
	input2=input2.substring(starting);
	//System.out.println(input1);
	if(input1.length()>input2.length()){
		System.out.println(">");
	return;
	}
	else if(input1.length()<input2.length()){
		System.out.println("<");
	return;
	}
	for (int i = 0; i < input1.length(); i++) {
		if(input1.charAt(i)>input2.charAt(i)){
			System.out.println(">");
		return;
		}
		else if(input2.charAt(i)>input1.charAt(i)){
			System.out.println("<");
			return;
		}
		else continue;
	}
	System.out.println("=");
}
}


import java.io.*;
import java.util.*;
public class easy {
public static void main(String[] args) throws IOException {
	BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
	String input1=in.readLine();
	int starting=0;
	while(starting!=input1.length()&&input1.charAt(starting)=='0'){
		starting++;
	}
	if(starting==input1.length())
		input1="";
	else
	input1=input1.substring(starting);
//	System.out.println(input1.substring(1));
	String input2=in.readLine();
	starting=0;

	while(starting!=input2.length()&&input2.charAt(starting)=='0'){
		starting++;
	}
	if(starting==input2.length())
		input2="";
	else
	input2=input2.substring(starting);
	//System.out.println(input1);
	if(input1.length()>input2.length()){
		System.out.println(">");
	return;
	}
	else if(input1.length()<input2.length()){
		System.out.println("<");
	return;
	}
	for (int i = 0; i < input1.length(); i++) {
		if(input1.charAt(i)>input2.charAt(i)){
			System.out.println(">");
		return;
		}
		else if(input2.charAt(i)>input1.charAt(i)){
			System.out.println("<");
			return;
		}
		else continue;
	}
	System.out.println("=");
}
}


import java.io.*;
import java.util.*;
public class easy {
public static void main(String[] args) throws IOException {
	BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
	String input1=in.readLine();

	while(input1.length()!=0&&input1.charAt(0)=='0'){
		input1=input1.substring(1);
	}
//	System.out.println(input1.substring(1));
	String input2=in.readLine();

	while(input2.length()!=0&&input2.charAt(0)=='0'){
		input2=input2.substring(1);
	}
	//System.out.println(input1);
	if(input1.length()>input2.length()){
		System.out.println(">");
	return;
	}
	else if(input1.length()<input2.length()){
		System.out.println("<");
	return;
	}
	for (int i = 0; i < input1.length(); i++) {
		if(input1.charAt(i)>input2.charAt(i)){
			System.out.println(">");
		return;
		}
		else if(input2.charAt(i)>input1.charAt(i)){
			System.out.println("<");
			return;
		}
		else continue;
	}
	System.out.println("=");
}
}


import java.io.*;
import java.util.*;
public class easy {
public static void main(String[] args) throws IOException {
	BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
	String input1=in.readLine();
	while(input1.charAt(0)=='0'){
		input1=input1.substring(1);
	}
//	System.out.println(input1.substring(1));
	String input2=in.readLine();

	while(input2.charAt(0)=='0'){
		input2=input2.substring(1);
	}
	//System.out.println(input1);
	if(input1.length()>input2.length()){
		System.out.println(">");
	return;
	}
	else if(input1.length()<input2.length()){
		System.out.println("<");
	return;
	}
	for (int i = 0; i < input1.length(); i++) {
		if(input1.charAt(i)>input2.charAt(i)){
			System.out.println("<");
		return;
		}
		else if(input2.charAt(i)>input1.charAt(i)){
			System.out.println(">");
			return;
		}
		else continue;
	}
	System.out.println("=");
}
}


import java.io.*;
import java.util.*;
public class easy {
public static void main(String[] args) throws IOException {
	BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
	String input1=in.readLine();
	int starting=0;
	while(input1.length()!=0&&input1.charAt(starting)=='0'){
		starting++;
	}
	input1=input1.substring(starting);
//	System.out.println(input1.substring(1));
	String input2=in.readLine();
	starting=0;
	while(input2.length()!=0&&input2.charAt(starting)=='0'){
		starting++;
	}
	input2=input2.substring(starting);
	//System.out.println(input1);
	if(input1.length()>input2.length()){
		System.out.println(">");
	return;
	}
	else if(input1.length()<input2.length()){
		System.out.println("<");
	return;
	}
	for (int i = 0; i < input1.length(); i++) {
		if(input1.charAt(i)>input2.charAt(i)){
			System.out.println(">");
		return;
		}
		else if(input2.charAt(i)>input1.charAt(i)){
			System.out.println("<");
			return;
		}
		else continue;
	}
	System.out.println("=");
}
}


import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Longint {

	static PrintWriter pw;

	public static void main(String[] args)
	{
		MySimp sc=new MySimp();
		pw=new PrintWriter(new BufferedOutputStream(System.out));
		String a=sc.nextLine();
		String b=sc.nextLine();
		int i=0;
		while(  a.length()>=2 && a.charAt(0)=='0'){
			i++;
		a=a.substring(1);

		}

		while( b.length()>=2 && b.charAt(0)=='0'){

		b=b.substring(1);
		}

		if(a.length()>b.length())
			pw.println(">");
		else if(b.length()>a.length())
			pw.println("<");

		else{
			i=0;
			while(i<a.length() && (a.charAt(i)==b.charAt(i)))
				i++;

			if(i==a.length())
				pw.println("=");
			else if((int)a.charAt(i)>(int)b.charAt(i))
				pw.println(">");
			else
				pw.println("<");
		}

		pw.close();

	}

}
class MySimp
{
	BufferedReader br;
	StringTokenizer st;
	MySimp()
	{
		br=new BufferedReader(new InputStreamReader(System.in));
	}
	String next()
	{

		while(st==null || !st.hasMoreTokens())
		{
			try
			{
				st=new StringTokenizer(br.readLine());
			}
			catch(Exception e)
			{
				e.printStackTrace();
			}
		}
		return st.nextToken();

	}
	int nextInt()
	{
		return Integer.parseInt(next());
	}
	long nextLong()
	{
		return Long.parseLong(next());
	}
	double nextDouble()
	{
		return Double.parseDouble(next());
	}
	String nextLine()
	{
		String str="";
		try
		{
			str=br.readLine();
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		return str;

	}
}


import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.math.*;

public class Longint {

	static PrintWriter pw;

	public static void main(String[] args)
	{
		MySimp sc=new MySimp();
		pw=new PrintWriter(new BufferedOutputStream(System.out));
		BigInteger a=new BigInteger(sc.nextLine());
		BigInteger b=new BigInteger(sc.nextLine());

		if(a.compareTo(b)==1)
			pw.println(">");
		else if(a.compareTo(b)==-1)
			pw.println(">");
		else
			pw.println("=");
		pw.close();

	}

}
class MySimp
{
	BufferedReader br;
	StringTokenizer st;
	MySimp()
	{
		br=new BufferedReader(new InputStreamReader(System.in));
	}
	String next()
	{

		while(st==null || !st.hasMoreTokens())
		{
			try
			{
				st=new StringTokenizer(br.readLine());
			}
			catch(Exception e)
			{
				e.printStackTrace();
			}
		}
		return st.nextToken();

	}
	int nextInt()
	{
		return Integer.parseInt(next());
	}
	long nextLong()
	{
		return Long.parseLong(next());
	}
	double nextDouble()
	{
		return Double.parseDouble(next());
	}
	String nextLine()
	{
		String str="";
		try
		{
			str=br.readLine();
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		return str;

	}
}


import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Longint {

	static PrintWriter pw;

	public static void main(String[] args)
	{
		MySimp sc=new MySimp();
		pw=new PrintWriter(new BufferedOutputStream(System.out));
		String a=sc.nextLine();
		String b=sc.nextLine();
		int i=0;
		while(  a.length()>=2 && a.charAt(i)=='0'){
			i++;
		a=a.substring(i);
		}
		i=0;
		while( b.length()>=2 && b.charAt(i)=='0'){
			i++;
		b=b.substring(i);
		}

		if(a.length()>b.length())
			pw.println(">");
		else if(b.length()>a.length())
			pw.println("<");

		else{
			i=0;
			while(i<a.length() && (a.charAt(i)==b.charAt(i)))
				i++;

			if(i==a.length())
				pw.println("=");
			else if((int)a.charAt(i)>(int)b.charAt(i))
				pw.println(">");
			else
				pw.println("<");
		}

		pw.close();

	}

}
class MySimp
{
	BufferedReader br;
	StringTokenizer st;
	MySimp()
	{
		br=new BufferedReader(new InputStreamReader(System.in));
	}
	String next()
	{

		while(st==null || !st.hasMoreTokens())
		{
			try
			{
				st=new StringTokenizer(br.readLine());
			}
			catch(Exception e)
			{
				e.printStackTrace();
			}
		}
		return st.nextToken();

	}
	int nextInt()
	{
		return Integer.parseInt(next());
	}
	long nextLong()
	{
		return Long.parseLong(next());
	}
	double nextDouble()
	{
		return Double.parseDouble(next());
	}
	String nextLine()
	{
		String str="";
		try
		{
			str=br.readLine();
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		return str;

	}
}


import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.math.*;

public class Longint {

	static PrintWriter pw;

	public static void main(String[] args)
	{
		MySimp sc=new MySimp();
		pw=new PrintWriter(new BufferedOutputStream(System.out));
		BigInteger a=new BigInteger(sc.nextLine());
		BigInteger b=new BigInteger(sc.nextLine());

		if(a.compareTo(b)==1)
			pw.println(">");
		else if(a.compareTo(b)==-1)
			pw.println("<");
		else
			pw.println("=");
		pw.close();

	}

}
class MySimp
{
	BufferedReader br;
	StringTokenizer st;
	MySimp()
	{
		br=new BufferedReader(new InputStreamReader(System.in));
	}
	String next()
	{

		while(st==null || !st.hasMoreTokens())
		{
			try
			{
				st=new StringTokenizer(br.readLine());
			}
			catch(Exception e)
			{
				e.printStackTrace();
			}
		}
		return st.nextToken();

	}
	int nextInt()
	{
		return Integer.parseInt(next());
	}
	long nextLong()
	{
		return Long.parseLong(next());
	}
	double nextDouble()
	{
		return Double.parseDouble(next());
	}
	String nextLine()
	{
		String str="";
		try
		{
			str=br.readLine();
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		return str;

	}
}


import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Longint {

	static PrintWriter pw;

	public static void main(String[] args)
	{
		MySimp sc=new MySimp();
		pw=new PrintWriter(new BufferedOutputStream(System.out));
		String a=sc.nextLine();
		String b=sc.nextLine();
		int n1=a.length();
		int n2=b.length();

		if(n1>n2)
		{
			for(int i=0;i<n1-n2;i++)
			{
				b="0"+b;
			}
		}
		if(n2>n1)
		{
			for(int i=0;i<n2-n1;i++)
			{
				a="0"+a;
			}
		}
		int x=a.compareTo(b);
		if(x==1)
		{
			pw.println(">");
		}
		else if(x==-1)
		{
			pw.println("<");
		}
		else
			pw.println("=");

		pw.close();

	}

}
class MySimp
{
	BufferedReader br;
	StringTokenizer st;
	MySimp()
	{
		br=new BufferedReader(new InputStreamReader(System.in));
	}
	String next()
	{

		while(st==null || !st.hasMoreTokens())
		{
			try
			{
				st=new StringTokenizer(br.readLine());
			}
			catch(Exception e)
			{
				e.printStackTrace();
			}
		}
		return st.nextToken();

	}
	int nextInt()
	{
		return Integer.parseInt(next());
	}
	long nextLong()
	{
		return Long.parseLong(next());
	}
	double nextDouble()
	{
		return Double.parseDouble(next());
	}
	String nextLine()
	{
		String str="";
		try
		{
			str=br.readLine();
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		return str;

	}
}