/*
  author: Kamal Kant Bhardwaj
  date:
*/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;

#define int             long long
#define N               20000006
#define F               first
#define S               second
#define test(x)         int x; cin>>x; while(x--)
#define pb              push_back
#define vi              vector<int>
#define mapp            map<int,int>
#define pqbig           priority_queue<int>
#define pqsmall         priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define Inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
mt19937                 rng(chrono::steady_clock::now().time_since_epoch().count());
//typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;


void c_p_c()
{
  ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
}

int32_t main() {

  c_p_c();
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  cout << (b - c) << endl;
  return 0;
}

#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
	int t;scanf("%d",&t);
	while(t--)
	{
		int n;scanf("%d%*s%*s%*s",&n);
		for(int i=1;i<=n;i++)putchar('0');
		for(int i=1;i<=n;i++)putchar('1');
		puts("0");
	}
	return 0;
}