Sonya decided to organize an exhibition of flowers. Since the girl likes only roses and lilies, she decided that only these two kinds of flowers should be in this exhibition.

There are $n$ flowers in a row in the exhibition. Sonya can put either a rose or a lily in the $i$-th position. Thus each of $n$ positions should contain exactly one flower: a rose or a lily.

She knows that exactly $m$ people will visit this exhibition. The $i$-th visitor will visit all flowers from $l_i$ to $r_i$ inclusive. The girl knows that each segment has its own beauty that is equal to the product of the number of roses and the number of lilies.

Sonya wants her exhibition to be liked by a lot of people. That is why she wants to put the flowers in such way that the sum of beauties of all segments would be maximum possible.


-----Input-----

The first line contains two integers $n$ and $m$ ($1\leq n, m\leq 10^3$) — the number of flowers and visitors respectively.

Each of the next $m$ lines contains two integers $l_i$ and $r_i$ ($1\leq l_i\leq r_i\leq n$), meaning that $i$-th visitor will visit all flowers from $l_i$ to $r_i$ inclusive.


-----Output-----

Print the string of $n$ characters. The $i$-th symbol should be «0» if you want to put a rose in the $i$-th position, otherwise «1» if you want to put a lily.

If there are multiple answers, print any.


-----Examples-----
Input
5 3
1 3
2 4
2 5

Output
01100
Input
6 3
5 6
1 4
4 6

Output
110010


-----Note-----

In the first example, Sonya can put roses in the first, fourth, and fifth positions, and lilies in the second and third positions;

  in the segment $[1\ldots3]$, there are one rose and two lilies, so the beauty is equal to $1\cdot 2=2$;  in the segment $[2\ldots4]$, there are one rose and two lilies, so the beauty is equal to $1\cdot 2=2$;  in the segment $[2\ldots5]$, there are two roses and two lilies, so the beauty is equal to $2\cdot 2=4$. 

The total beauty is equal to $2+2+4=8$.

In the second example, Sonya can put roses in the third, fourth, and sixth positions, and lilies in the first, second, and fifth positions;

  in the segment $[5\ldots6]$, there are one rose and one lily, so the beauty is equal to $1\cdot 1=1$;  in the segment $[1\ldots4]$, there are two roses and two lilies, so the beauty is equal to $2\cdot 2=4$;  in the segment $[4\ldots6]$, there are two roses and one lily, so the beauty is equal to $2\cdot 1=2$. 

The total beauty is equal to $1+4+2=7$.

Difficulty: EASY
Tags: Mathematics

Greedy algorithms

Implementation

Constructive algorithms
Skill types: Greedy algorithms
Expected Time Complexity: O(N)

Starter code:

Solutions:
(n, m) = map(int, input().split())
for i in range(0, n):
	if i % 2 > 0:
		print('1', end='')
	else:
		print('0', end='')


(n, m) = map(int, input().split())
s = '10' * (n // 2)
if n & 1:
	s += '1'
print(s)


a = list(input().split(' '))
(n, m) = (int(a[0]), int(a[1]))
res = list((-1 for x in range(n)))
for i in range(n):
	print(i % 2, sep='', end='')


(n, m) = map(int, input().split())
li = ['0'] * (n + 1)
mc = n // 2
for i in range(m):
	(l, r) = map(int, input().split())
for i in range(2, n + 1, 2):
	li[i] = '1'
s = ''.join(li)
print(s[1:])


(n, m) = [int(x) for x in input().split()]
for i in range(m):
	input()
print('01' * int(n / 2) + ('0' if n % 2 != 0 else ''))


import sys
import os

def sonyaAndExhibition(n, m, visitors):
	return ('01' * n)[:n]

def main():
	(n, m) = (int(x) for x in input().split())
	visitors = []
	for i in range(m):
		(l, r) = (int(x) for x in input().split())
		visitors.append((l, r))
	print(sonyaAndExhibition(n, m, visitors))

def __starting_point():
	main()
__starting_point()


import math as m

def main():
	rd = lambda : list(map(int, input().split()))
	(n, m) = rd()
	seg = []
	for i in range(m):
		seg.append(rd())
	print('01' * int(n / 2), end='')
	if int(n / 2) != n / 2:
		print('0')
main()


(n, m) = map(int, input().split())
print(('01' * ((n + 1) // 2))[:n])


(n, m) = [int(v) for v in input().split()]
if n % 2 == 0:
	print('10' * (n // 2))
else:
	print('10' * (n // 2) + '1')


(a, b) = map(int, input().split())
l = []
for i in range(b):
	(m, n) = map(int, input().split())
	l.append([m, n])
s = ''
for i in range(a):
	if i % 2 == 0:
		s += '1'
	else:
		s += '0'
print(s)


(n, m) = map(int, input().split())
s = ''.join(['0' if i % 2 == 0 else '1' for i in range(n)])
for i in range(m):
	(l, r) = map(int, input().split())
print(s)


(n, m) = input().split()
n = int(n)
m = int(m)
for i in range(m):
	(a, b) = input().split()
for i in range(n):
	print(i % 2, end='')


import sys

def mp():
	return list(map(int, input().split()))

def dead():
	print('-1')
	sys.exit()
debug = 0
if debug:
	f = open('input.txt', 'r')
	input = f.readline

def _main():
	(n, m) = mp()
	a = [0] * m
	for i in range(m):
		a[i] = mp()
	s = [1] * n
	for i in range(0, n, 2):
		s[i] = 0
	print(*s, sep='')
_main()


print(''.join((str(i % 2) for i in range(int(input().split()[0])))))


i = 0
n = input()
n = n.split(' ')
n = int(n[0])
while i < n:
	print(i % 2, end='')
	i += 1


(n, m) = [int(x) for x in input().split()]
a = []
for ii in range(m):
	a.append([int(x) for x in input().split()])
for i in range(n):
	print(i & 1, end='')
print()


nm = input().split()
n = int(nm[0])
m = int(nm[1])
for _ in range(m):
	input()
res = '10' * (n // 2) + '1' * (n % 2)
print(res)


(n, m) = list(map(int, input().split()))
a = [list(map(int, input().split())) for i in range(m)]
for i in range(n):
	print(i % 2, end='')


[n, v] = [int(i) for i in input().split()]
out_str = '10' * (n // 2) + '1' * (n - 2 * (n // 2))
print(out_str)


import sys
lines = []
for line in sys.stdin:
	lines.append(line)
length = int(lines[0].split()[0])
answer = '10' * (length // 2)
if length % 2 == 1:
	answer = answer + '1'
print(answer)


(n, k) = input().split()
(n, k) = (int(n), int(k))
ls = []
for i in range(n):
	if i % 2 == 0:
		ls.append('0')
	else:
		ls.append('1')
print(''.join(ls))


(n, m) = map(int, input().split())
while m:
	(l, r) = map(int, input().split())
	m -= 1
s = '01' * (n // 2)
if n % 2 == 0:
	print(s)
else:
	print(s + '0')


import math
(n, m) = map(int, input().strip().split(' '))
for i in range(m):
	(l, r) = map(int, input().strip().split(' '))
s = '10' * n
print(s[:n])


(n, m) = map(int, input().split())
for i in range(m):
	input()
if n % 2 == 0:
	print('01' * (n // 2))
else:
	print('01' * (n // 2) + str(0))


F = lambda : list(map(int, input().split()))
(n, m) = F()
s = dict([F() for _ in range(m)])
(div, mod) = divmod(n, 2)
print('01' * div + '0' * mod)


line = input().split()
n = int(line[0])
m = int(line[1])
lr = []
for i in range(m):
	xi = input().split()
	lr.append((int(xi[0]), int(xi[1])))
res = []
for i in range(n):
	if i % 2 == 0:
		res.append('0')
	else:
		res.append('1')
print(''.join(res))


(n, m) = map(int, input().split())
for _ in range(m):
	(a, b) = map(int, input().split())
print('01' * (n // 2) + '0' * (n % 2))


TN = 1

def solution():
	(n, m) = map(int, input().split())
	lr = []
	ln = []
	for i in range(m):
		(x, y) = map(int, input().split())
		ln.append(y - x + 1)
		lr.append([x, y])
	print('01' * (n // 2) + '0' * (n % 2))
while TN != 0:
	solution()
	TN -= 1


def calc(l):
	res = 0
	for (li, ri) in lr:
		(zero, one) = (0, 0)
		for i in range(li - 1, ri):
			if l[i] == 0:
				zero += 1
			else:
				one += 1
		res += zero * one
	return res
(n, m) = map(int, input().split())
lr = [tuple(map(int, input().split())) for _ in range(m)]
(l1, l2) = ([], [])
for i in range(n):
	if i % 2 == 0:
		l1.append(0)
		l2.append(1)
	else:
		l1.append(1)
		l2.append(0)
(v1, v2) = (calc(l1), calc(l2))
if v1 > v2:
	print(''.join(map(str, l1)))
else:
	print(''.join(map(str, l2)))


(n, m) = map(int, input().split())
s = ''
for i in range(m):
	(x, y) = map(int, input().split())
n1 = n // 2
s = '10' * n1
if n % 2 != 0:
	s += '1'
print(s)


(n, m) = [int(i) for i in input().strip().split()]
flowers = [0] * n
visitors = []
for _ in range(m):
	(l, r) = [int(i) for i in input().strip().split()]
	visitors.append((l - 1, r - 1))
for i in range(1, n, 2):
	flowers[i] = 1
print(''.join(map(str, flowers)))


(n, m) = map(int, input().split())
clients = []
for i in range(m):
	temp_l = list(map(int, input().split()))
	clients.append(temp_l)
print('10' * (n // 2), end='')
if n % 2 == 1:
	print('1')


(n, v) = map(int, input().split())
visitors = []
for i in range(v):
	(l, r) = map(int, input().split())
	visitors.append([r - l + 1, l, r])
dist = []
for i in range(n):
	if i % 2:
		dist.append('0')
	else:
		dist.append('1')
print(''.join(dist))


(n, m) = map(int, input().split())
l = list()
r = list()
for _ in range(m):
	(a, b) = map(int, input().split())
	l.append(a)
	r.append(b)
for i in range(n):
	if i % 2 == 0:
		print(0, end='')
	else:
		print(1, end='')


(n, m) = [int(i) for i in input().split()]
p = []
for i in range(m):
	(ii, jj) = [int(i) for i in input().split()]
	p += [[ii, jj]]
s = ''
for i in range(n):
	if i % 2 == 0:
		s += '1'
	else:
		s += '0'
print(s)


(n, m) = map(int, input().split())
for _ in range(m):
	a = input()
s = ''
for i in range(n // 2):
	s += '10'
if n % 2 == 1:
	s += '1'
else:
	pass
print(s)


(n, m) = [int(x) for x in input().strip().split()]
print(''.join(('01' for _ in range(n // 2 + 1)))[:n])


(n, m) = [int(i) for i in input().split()]
a = [0] * (n + 1)
for i in range(m):
	(p, q) = [int(i) for i in input().split()]
for i in range(n):
	if i % 2:
		print('1', end='')
	else:
		print('0', end='')


(n, m) = map(int, input().split())
u = []
for i in range(m):
	(a, b) = map(int, input().split())
	u.append((a, b))
ans = ''
for i in range(n):
	k = i % 2
	ans += str(k)
print(ans)


(n, k) = map(int, input().split(' '))
a = []
for i in range(0, k):
	(x, y) = map(int, input().split(' '))
	a.append([x, y])
if n % 2 == 0:
	print('01' * (n // 2))
else:
	print('01' * (n // 2) + '0')


from __future__ import print_function
import sys

def ni():
	return map(int, input().split())

def nio(offset):
	return map(lambda x: int(x) + offset, input().split())

def nia():
	return list(map(int, input().split()))

def toString(aList, sep=' '):
	return sep.join((str(x) for x in aList))

def toMapInvertIndex(aList):
	return {k: v for (v, k) in enumerate(aList)}

def sortId(arr):
	return sorted(range(arr), key=lambda k: arr[k])
(n, m) = ni()
print(('01' * ((n + 1) // 2))[:n])


(n, m) = [int(i) for i in input().split()]
for j in range(m):
	(l, r) = [int(x) for x in input().split()]
s = ''
for y in range(n):
	s += str(y % 2)
print(s)


(n, m) = input().split(' ')
n = int(n)
m = int(m)
for i in range(m):
	input()
st = ''
for i in range(n):
	if i % 2 == 0:
		st += '1'
	else:
		st += '0'
print(st)


(n, m) = map(int, input().split())
for k in range(m):
	(l, r) = map(int, input().split())
print('10' * (n // 2) + '1' * (n % 2))


(n, m) = map(int, input().split())
arr = []
for i in range(m):
	arr.append(list(map(int, input().split())))
k = 0
ans = str()
for i in range(n):
	ans += str(k ^ 1)
	k = k ^ 1
print(ans)


(n, m) = map(int, input().split())
arr = ['01' for _ in range(n // 2)]
if n % 2 == 1:
	arr.append('0')
print(''.join(arr))


(n, k) = map(int, input().split())
r = ''
for i in range(k):
	l = list(map(int, input().split()))
for i in range(n):
	if i % 2 == 1:
		r = r + '1'
	else:
		r = r + '0'
print(r)


(n, m) = map(int, input().split())
ans = [0] * n
for i in range(m):
	(l, r) = map(int, input().split())
for i in range(n):
	if i % 2 == 0:
		ans[i] = 1
print(''.join(map(str, ans)))


(n, m) = map(int, input().split())
for i in range(m):
	(q, w) = map(int, input().split())
q = 0
ans = ''
for i in range(n):
	ans += str(q)
	q = (q + 1) % 2
print(ans)


[n, c] = [int(item) for item in input().split(' ')]
for _ in range(c):
	_ = [int(item) for item in input().split(' ')]
s = '01' * (n // 2)
if n % 2:
	s += '0'
print(s)


from sys import stdin, stdout
import math
I = lambda : map(int, stdin.readline().split())
(n, m) = I()
for i in range(m):
	(l, r) = I()
s = ''
f = 0
for i in range(n):
	if f != 2:
		s += '1'
		f = 2
	elif f != 1:
		s += '0'
		f = 1
print(s)


import sys, math, bisect
inf = float('inf')
mod = 10 ** 9 + 7

def lcm(a, b):
	return int(a / math.gcd(a, b) * b)

def gcd(a, b):
	return int(math.gcd(a, b))

def tobinary(n):
	return bin(n)[2:]

def binarySearch(a, x):
	i = bisect.bisect_left(a, x)
	if i != len(a) and a[i] == x:
		return i
	else:
		return -1

def lowerBound(a, x):
	i = bisect.bisect_left(a, x)
	if i:
		return i - 1
	else:
		return -1

def upperBound(a, x):
	i = bisect.bisect_right(a, x)
	if i != len(a) + 1 and a[i - 1] == x:
		return i - 1
	else:
		return -1

def primesInRange(n):
	ans = []
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	for p in range(2, n + 1):
		if prime[p]:
			ans.append(p)
	return ans
from collections import deque, defaultdict
for _ in range(1):
	(n, k) = map(int, input().split())
	arr = []
	for i in range(k):
		arr.append(list(map(int, input().split())))
	ans = ['1' if i % 2 == 0 else '0' for i in range(n)]
	print(''.join(ans))


(n, d) = list(map(int, input().split()))
ans = '01' * (n // 2)
if n % 2:
	ans += '0'
print(ans)


(n, d) = map(int, input().split())
for i in range(n):
	print(i % 2, end='')
print()


(n, m) = map(int, input().split())
c = 0
ans = str()
for i in range(n):
	ans += str(c ^ 1)
	c = c ^ 1
print(ans)


def input_int():
	return list(map(int, input().split()))
(n, m) = input_int()
for _ in range(m):
	(a, b) = input_int()
c = ['1', '0']
s = ''
for i in range(n):
	s = s + c[i % 2]
print(s)


print((lambda n: ('01' * n)[:n])(int(input().split()[0])))


def scanf(t=int):
	return list(map(t, input().split()))
(n, m) = scanf()
s = '01' * (n // 2) + '0' * (n % 2)
print(s)


(n, m) = map(int, input().split())
for i in range(m):
	(a, b) = map(int, input().split())
ans = [int(i % 2 == 0) for i in range(n)]
print(''.join(map(str, ans)))


(n, m) = [int(i) for i in input().split()]
g = []
for i in range(m):
	g.append(input().split())
for i in range(n):
	if i % 2 == 0:
		print('1', end='')
	else:
		print('0', end='')
print()


def I():
	return list(map(int, input().split()))
(n, m) = I()
for i in range(m):
	input()
s = ''
for i in range(n):
	s += '1' if i % 2 else '0'
print(s)


(n, m) = map(int, input().split())
s = '01' * n
print(s[:n])


(n, m) = map(int, input().split())
v = []
for i in range(m):
	v.append([int(item) - 1 for item in input().split()])
v = sorted(v, key=lambda x: x[1] - x[0], reverse=True)
answer = ['0' if i % 2 else '1' for i in range(n)]
print(''.join(answer))


(total, mem) = [int(x) for x in input().split(' ')]
for x in range(mem):
	input()
out = '01' * (total // 2)
if total % 2 == 1:
	out += '0'
print(out)


def solve(total, guest, segment):
	for index in range(total):
		if index % 2 == 0:
			print(0, end='')
		else:
			print(1, end='')
(total, guest) = list(map(int, input().split()))
seg = []
for _ in range(guest):
	seg.append(input().split())
solve(total, guest, seg)


(n, k) = map(int, input().split())
for i in range(k):
	q = input()
print(''.join((str(i % 2) for i in range(n))))


(n, d) = map(int, input().split())
for i in range(d):
	(a, b) = map(int, input().split())
print('10' * (n // 2) + '1' * (n % 2))


(f, n) = [int(x) for x in input().split(' ')]
ls = {}
rs = {}
for i in range(n):
	(l, r) = [int(x) for x in input().split(' ')]
	ls[i] = l
	rs[i] = r
s = ''
for i in range(f):
	s += str(i % 2)
print(s)


(n, _) = map(int, input().split())
s = '01' * (n // 2) + ('0' if n % 2 == 1 else '')
print(s)


from __future__ import print_function
import sys
import math
import os.path
import random
from copy import deepcopy
from functools import reduce
from collections import Counter, ChainMap, defaultdict
from itertools import cycle, chain
from queue import Queue, PriorityQueue
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, nlargest, nsmallest
import bisect
from statistics import mean, mode, median, median_low, median_high
sys.setrecursionlimit(10 ** 9)

def log(*args, **kwargs):
	print(*args, file=sys.stderr, **kwargs)

def ni():
	return map(int, input().split())

def nio(offset):
	return map(lambda x: int(x) + offset, input().split())

def nia():
	return list(map(int, input().split()))

def toString(aList, sep=' '):
	return sep.join((str(x) for x in aList))

def toMapInvertIndex(aList):
	return {k: v for (v, k) in enumerate(aList)}

def sortId(arr):
	return sorted(range(arr), key=lambda k: arr[k])
(n, m) = ni()
print(('01' * ((n + 1) // 2))[:n])


(n, m) = map(int, input().split())
for i in range(m):
	input()
c = 0
for i in range(n):
	print(c, end='')
	c ^= 1


(n, m) = map(int, input().split())
for i in range(m):
	(a, b) = map(int, input().split())
for i in range(n):
	print(i & 1, end='')
print()


(n, m) = map(int, input().split())
for i in range(m):
	(l, r) = map(int, input().split())
ans = '10' * (n // 2) + ('1' if n % 2 == 1 else '')
print(ans)


from collections import Counter, defaultdict, deque
(n, m) = [int(x) for x in input().split()]
for i in range(m):
	a = input()
print('01' * (n // 2) + '0' * (n % 2 == 1))


(n, m) = input().split()
n = int(n)
m = int(m)
for i in range(m):
	(l, r) = input().split()
for i in range(n // 2):
	print('01', end='')
if n % 2 != 0:
	print('0')


def STR():
	return list(input())

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def MAP2():
	return map(float, input().split())

def LIST():
	return list(map(int, input().split()))

def STRING():
	return input()
import string
import sys
from heapq import heappop, heappush
from bisect import *
from collections import deque, Counter, defaultdict
from math import *
from itertools import permutations, accumulate
dx = [-1, 1, 0, 0]
dy = [0, 0, 1, -1]
(n, m) = MAP()
for i in range(m):
	(l, r) = MAP()
t = ''
f = 0
for i in range(n):
	if f == 0:
		t += str(f)
		f = 1
	else:
		t += str(f)
		f = 0
print(t)


print(('01' * 99999)[:int(input().split()[0])])


from math import *
from string import *
from itertools import *
(N, M) = map(int, input().split())
for m in range(M):
	(l, r) = map(int, input().split())
if N & 1 == 0:
	x = '10' * (N // 2)
	print(x)
else:
	x = '10' * (N // 2)
	x += '1'
	print(x)


(n, m) = input().split()
(n, m) = [int(n), int(m)]
a = []
for i in range(0, n):
	a.append(i % 2)
print(*a, sep='')


(n, m) = map(int, input().split())
x = [0]
for i in range(n - 1):
	x.append(1 - x[-1])
print(''.join(map(str, x)))


(n, m) = map(int, input().split())
for i in range(m):
	(a, b) = map(int, input().split())
cnt = n // 2
print('10' * cnt + '1' * (n % 2 != 0))


(n, k) = input().split()
n = int(n)
strn = ''
for i in range(0, n):
	if i % 2 == 0:
		strn += '1'
	else:
		strn += '0'
print(strn)


(m, n) = map(int, input().split())
for i in range(n):
	a = input().split()
z = '10' * m
print(z[:m])


(n, m) = map(int, input().split())
print('10' * (n // 2) + '1' * (n % 2))


(n, p) = map(int, input().split())
for i in range(p):
	(a, b) = map(int, input().split())
for i in range(n):
	if i % 2 == 0:
		print('0', end='')
	else:
		print('1', end='')


(f, v) = map(int, input().split())
for i in range(v):
	(l, r) = map(int, input().split())
print('01' * (f // 2), end='')
if f % 2 != 0:
	print(0)


mod = 1000000007
MOD = 998244353
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
it = lambda : tuple(map(int, input().split()))
ls = lambda : list(input())
s = '01' * 10 ** 3
(n, k) = f()
l = []
for i in range(k):
	l.append(il())
print(s[:n])


(n, m) = map(int, input().split())
for i in range(m):
	(a, b) = map(int, input().split())
string = []
for i in range(n):
	string.append(str(i % 2))
print(''.join(string))


(n, k) = map(int, input().split())
arr = []
for i in range(k):
	(x, y) = map(int, input().split())
	arr.append([x, y])
arr1 = [0] * n
for i in range(n):
	if i % 2 == 0:
		arr1[i] = 0
	else:
		arr1[i] = 1
s = ''
for i in arr1:
	s += str(i)
print(s)


(n, m) = map(int, input().split())
l = [list(map(int, input().split())) for i in range(m)]
ans = '01' * (n // 2) + '0' * (n % 2)
print(ans)


print(('10' * 999)[:[int(x) for x in input().split()][0]])


(n, m) = list(map(int, input().split()))
s = [0] * 9999999
for i in range(m):
	s[i] = input()
l = [0] * n
for i in range(0, n, 2):
	l[i] = 1
print(''.join(map(str, l)))


def problem(in1):
	inp1 = list(map(int, in1.split()))
	n = inp1[0]
	guests = inp1[1]
	s = ''.join(['10' for x in range(n // 2)])
	if n % 2 == 1:
		s += '1'
	return s
in1 = input()
result = problem(in1)
print(result)


(n, z) = map(int, input().split())
s = '01' * 1000
print(s[:n])


(n, m) = map(int, input().split())
ans = ['0'] * n
for i in range(1, n, 2):
	ans[i] = '1'
print(''.join(ans))


read = lambda : map(int, input().split())
(n, m) = read()
for i in range(m):
	read()
print(n // 2 * '01' + n % 2 * '0')


(n, d) = map(int, input().split(' '))
l = []
r = []
res = 0
for i in range(d):
	(lx, rx) = map(int, input().split(' '))
	l.append(lx)
	r.append(rx)
	x = rx - lx + 1
	y = x // 2
	res += y * (x - y)
s = []
for i in range(n):
	s.append(chr(ord('0') + i % 2))
print(''.join(s))


(n, m) = map(int, input().split())
ans = '10' * (n // 2)
if n & 1 == 1:
	ans += '1'
print(ans)


(n, m) = map(int, input().split())
q = ''
for i in range(m):
	(x, y) = map(int, input().split())
for i in range(n):
	q = q + str(1 - i % 2)
print(q)


def main():
	[n, m] = list(map(int, input().split(' ')))
	map(input, range(m))
	output = '0'
	while len(output) < n:
		if output.endswith('0'):
			output += '1'
		elif output.endswith('1'):
			output += '0'
	print(output)
main()


(n, _) = map(int, input().split())
print(('01' * n)[:n])


(n, k) = [int(x) for x in input().split()]
for i in range(k):
	a = input()
a = '0'
s = ''
for i in range(n):
	s += a
	if a == '0':
		a = '1'
	else:
		a = '0'
print(s)


R = lambda : map(int, input().split())
(n, m) = R()
print(((n + 1) // 2 * '01')[:n])


a = input().split()
n = int(a[0])
m = int(a[1])
flag = False
for i in range(m):
	b = input()
for i in range(n):
	if flag:
		print(1, end='')
		flag = False
	else:
		print(0, end='')
		flag = True


def main():
	(n, m) = map(int, input().split())
	audience = []
	for i in range(m):
		audience.append(tuple(map(int, input().split())))
	print('10' * (n // 2) + '1' * (n % 2))
	return 0
main()


def calc(s):
	presum = [0]
	for ch in s:
		presum.append(presum[-1])
		if ch == '1':
			presum[-1] += 1
	ans = 0
	for (l, r) in points:
		ans += (r - l + 1 - (presum[r] - presum[l - 1])) * (presum[r] - presum[l - 1])
	return ans
(n, m) = list(map(int, input().split()))
print('10' * (n // 2) + ('1' if n % 2 else ''))


(n, m) = [int(x) for x in input().split()]
print(''.join((str(i % 2) for i in range(n))))


(n, m) = list(map(int, input().split()))
b = True
for i in range(n):
	if b == True:
		print(1, end='')
		b = False
	else:
		print(0, end='')
		b = True


(n, m) = map(int, input().split())
for _ in range(m):
	input()
for _ in range(n // 2):
	print('01', end='')
if n % 2 == 1:
	print('0')


(n, m) = map(int, input().split())
for i in range(m):
	input()
print('10' * (n // 2) + '1' * (n % 2))


(a, b) = map(int, input().split())
(q, r) = divmod(a, 2)
print('01' * q + '0' * r)


(flowers, people) = list(map(int, input().split(' ')))
for _ in range(people):
	input()
print('10' * int(flowers / 2) + '1' * (flowers % 2))


(n, m) = map(int, input().split())
l = [list(map(int, input().split())) for _ in range(m)]
print('01' * (n // 2) + '0' * (n % 2))


inp = [int(i) for i in input().split()]
(n, m) = inp
for i in range(m):
	a = input()
print(('01' * (n // 2 + 1))[:n])


(n, m) = list(map(int, input().split()))
for i in range(m):
	k = input()
if n % 2 == 0:
	print('01' * (n // 2))
else:
	print('01' * (n // 2) + '0')


from math import *
import sys
input = sys.stdin.readline

def main():
	(n, m) = [int(x) for x in input().split(' ')]
	for i in range(n):
		print(1 if i % 2 == 0 else 0, end='')
main()


[n, m] = [int(x) for x in input().split()]
s = '01' * (n // 2)
if n & 1:
	s += '0'
for che in range(m):
	[l, r] = [int(x) for x in input().split()]
print(s)


(n, m) = map(int, input().split())
for _ in range(m):
	(x, y) = map(int, input().split())
s = '10' * (n // 2)
if n % 2 == 1:
	s += '1'
print(s)


(n, m) = list(map(int, input().split()))
a = 1
for i in range(n):
	if a == 1:
		print('0', end='')
	else:
		print('1', end='')
	a *= -1


(n, m) = map(int, input().strip().split())
ans = ''
for _ in range(m):
	x = map(int, input().strip().split())
for i in range(n):
	if i % 2 == 0:
		ans += '0'
	else:
		ans += '1'
print(ans)


(n, m) = [int(x) for x in input().split(' ')]
visitos = []
for i in range(m):
	visitos.append([int(x) for x in input().split(' ')])
sol = ''
for i in range(n):
	sol += str(i % 2)
print(sol)


(n, m) = list(map(int, input().split(' ')))
(l, r) = ([], [])
for i in range(0, m):
	(l1, r1) = list(map(int, input().split(' ')))
	l.append(l1)
	r.append(r1)
t = True
for i in range(0, n):
	if t:
		print(1, end='')
		t = False
	else:
		print(0, end='')
		t = True


(n, m) = list(map(int, input().split()))
pairs = []
for i in range(m):
	(l, r) = list(map(int, input().split()))
	pairs.append((l, r))
r = True
for i in range(n):
	print('1' if r else '0', end='')
	r = not r


(n, m) = map(int, input().split())
s = ''
for i in range(m):
	l1 = list(map(int, input().split()))
for i in range(n):
	if i % 2 == 0:
		s += '0'
	else:
		s += '1'
print(s)


(n, m) = map(int, input().split())
a = []
for i in range(n):
	if i % 2 == 0:
		a.append('1')
	else:
		a.append('0')
print(''.join(a))


(n, m) = map(int, input().split())
ans = []
for j in range(m):
	a = list(map(int, input().split()))
for i in range(n):
	ans.append(i % 2)
print(*ans, sep='')


a = [int(q) for q in input().strip().split()]
b = []
for k in range(a[1]):
	t = input()
for k in range(int(a[0] / 2)):
	b.append('10')
if int(a[0]) % 2 == 1:
	b.append('1')
print(''.join(b))


a = int(input().split()[0])
print('10' * (a // 2) + '1' * (a % 2))


print(('01' * 500)[:int(input().split()[0])])


import math as ma
from sys import exit
from decimal import Decimal as dec

def li():
	return list(map(int, input().split()))

def num():
	return map(int, input().split())

def nu():
	return int(input())
(n, m) = num()
s = ''
for i in range(n // 2):
	s += '10'
if n % 2 == 1:
	s += '1'
print(s)


[n, m] = list(map(int, input().split()))
L = []
R = []
for _ in range(m):
	[a, b] = list(map(int, input().split()))
	L.append(a)
	R.append(b)
print('01' * (n // 2) + '0' * (n % 2))


def go():
	(n, m) = [int(i) for i in input().split(' ')]
	o = ''
	for i in range(m):
		input()
	for i in range(n):
		if i % 2 == 0:
			o += '0'
		else:
			o += '1'
	return o
print(go())


(n, d) = list(map(int, input().split()))
print(''.join((str(i % 2) for i in range(n))))


import sys, math
(n, m) = map(int, sys.stdin.readline().split())
for i in range(m):
	(x, y) = map(int, sys.stdin.readline().split())
for i in range(n):
	if i % 2 == 0:
		print('1', end='')
	else:
		print('0', end='')


(n, m) = [int(c) for c in input().split()]
(s1, s2) = ([], [])
for i in range(n):
	s2.append(i & 1)
	s1.append(i + 1 & 1)
b1 = 0
b2 = 0
for i in range(m):
	(l, r) = [int(c) for c in input().split()]
	b1 += s1[l - 1:r].count(1) * s1[l - 1:r].count(0)
	b2 += s2[l - 1:r].count(1) * s2[l - 1:r].count(0)
if b1 > b2:
	print(*s1, sep='')
else:
	print(*s2, sep='')


import sys
(n, m) = (int(x) for x in sys.stdin.readline().split())
for i in range(0, n):
	sys.stdout.write(str(i & 1))


def main():
	(n, m) = map(int, input().split())
	print(''.join(('01'[i & 1] for i in range(n))))
main()


import sys, heapq
(n, m) = map(int, sys.stdin.readline().split())
for _ in range(m):
	(a, b) = map(int, sys.stdin.readline().split())
ans = [0] * n
for i in range(1, n, 2):
	ans[i] = 1
print(''.join(map(str, ans)))


def calc(s):
	presum = [0]
	for ch in s:
		presum.append(presum[-1])
		if ch == '1':
			presum[-1] += 1
	ans = 0
	for (l, r) in points:
		ans += (r - l + 1 - (presum[r] - presum[l - 1])) * (presum[r] - presum[l - 1])
	return ans
(n, m) = list(map(int, input().split()))
points = []
for _ in range(m):
	points.append(list(map(int, input().split())))
ans1 = '10' * (n // 2)
ans2 = '01' * (n // 2)
if n % 2:
	ans1 += '1'
	ans2 += '0'
print(ans1 if calc(ans1) > calc(ans2) else ans2)


(n, d) = map(int, input().split())
print('10' * (n // 2), end='')
if n % 2:
	print(1)


(n1, m1) = input().split(' ')
n = int(n1)
m = int(m1)
l = [0] * m
r = [0] * m
for i in range(m):
	(l[i], r[i]) = input().split(' ')
for i in range(n):
	if i % 2 == 0:
		print(0, end='')
	else:
		print(1, end='')


import sys
RI = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
(n, k) = RI()
lis = []
for i in range(k):
	(a, b) = RI()
	lis.append([a, b])
for i in range(n):
	print(i % 2, end='')
print()


(n, m) = map(int, input().split())
s = []
ans = [None for i in range(n)]
for i in range(m):
	(x, y) = map(int, input().split())
	s.append([[abs(y - x)], [x, y]])
ans = ''
t = True
for i in range(n):
	if t:
		ans += '1'
	else:
		ans += '0'
	t = not t
print(ans)


import sys
n = input().split()
number_of_flowers = int(n[0])
visitors = int(n[1])
for i in range(visitors):
	coords = input().split()
	left = int(coords[0])
	right = int(coords[1])
for j in range(number_of_flowers):
	print(j % 2, end='')


print((1000 * '01')[:int(input().split()[0])])


n = int(input().split()[0])
print('01' * (n >> 1) + '0' * (n & 1))


from sys import stdin, stdout
from itertools import cycle
(n, m) = stdin.readline().split()
(w, s) = (stdout.write, cycle('01'))
for _ in range(int(n)):
	w(next(s))
print()


(n, m) = map(int, input().split())
ls = list()
for i in range(m):
	p = list(map(int, input().split()))
	ls.append(p)
for i in range(n):
	if i % 2:
		print(0, end='')
	else:
		print(1, end='')


(n, m) = map(int, input().split())
a = '01' * (n // 2)
if n % 2:
	a = a + '0'
print(a)


a = list(map(int, input().split()))
n = a[0]
m = a[1]
k = []
for i in range(m):
	k.append(list(map(int, input().split())))
s = ''
for i in range(n):
	if i % 2 == 0:
		s += '1'
	else:
		s += '0'
print(s)


(n, m) = (int(x) for x in input().split())
for a in range(m):
	input()
ans = '01' * n
ans = ans[:n]
print(ans)


n1 = input()
n1 = n1.split()
n = int(n1[0])
m = int(n1[1])
for i in range(m):
	a = input()
a = ''
for i in range(n):
	if i % 2 == 1:
		a += '0'
	else:
		a += '1'
print(a)


def readList(converter=str):
	return [converter(x) for x in input().strip().split()]
(n, m) = readList(int)
print('10' * (n // 2) + ('1' if n % 2 == 1 else ''))


from itertools import *
(n, m) = map(int, input().split())
inp = []
for i in range(m):
	(l, r) = map(int, input().split())
if n % 2 == 0:
	ans = n // 2 * '10'
	print(ans)
else:
	print(n // 2 * '10', end='')
	print('1')


(n, d) = map(int, input().split())
print(''.join([chr(ord('0') + i % 2) for i in range(n)]))


(n, m) = map(int, input().split())
print('01' * (n // 2) + '0' * (n % 2))


l1 = list(map(int, input().split()))
n = l1[1]
l = []
for i in range(n):
	l2 = list(map(int, input().split()))
for i in range(l1[0]):
	l.append(str(i % 2))
print(''.join(l))


(n, d) = map(int, input().split())
arr = []
for i in range(d):
	arr.append(list(map(int, input().split())))
s = ''
for i in range(n):
	if i % 2 == 0:
		s = s + '0'
	else:
		s = s + '1'
print(s)


(n, nSegs) = map(int, input().split())
segs = [tuple(map(lambda x: int(x) - 1, input().split())) for _ in range(nSegs)]
ret = '01' * (n // 2) + '0' * (n & 1)
print(ret)


(x, y) = map(int, input().split())
for i in range(x):
	print(i % 2, end='')


n = int(input().split()[0])
out = ''
for i in range(n):
	out += str(i % 2)
print(out)


from sys import stdin, stdout
(n, m) = map(int, stdin.readline().split())
ans = [i % 2 for i in range(n)]
for i in range(n):
	print(ans[i], end='')


import math
(n, k) = map(int, input().split())
for _ in range(k):
	(l, r) = map(int, input().split())
for i in range(1, n + 1):
	if i % 2 == 0:
		print('0', end='')
	else:
		print('1', end='')
print()


import collections
from functools import cmp_to_key
import math
import sys

def getIntList():
	return list(map(int, input().split()))
import bisect
try:
	import numpy
	dprint = print
	dprint('debug mode')
except ModuleNotFoundError:

	def dprint(*args, **kwargs):
		pass

def makePair(z):
	return [(z[i], z[i + 1]) for i in range(0, len(z), 2)]

def memo(func):
	cache = {}

	def wrap(*args):
		if args not in cache:
			cache[args] = func(*args)
		return cache[args]
	return wrap

@memo
def comb(n, k):
	if k == 0:
		return 1
	if n == k:
		return 1
	return comb(n - 1, k - 1) + comb(n - 1, k)
(n, m) = getIntList()
for x in range(n):
	print(x % 2, end='')
print()


(n, k) = map(int, input().split())
a = [0] * k
b = [0] * k
for i in range(k):
	(x, y) = map(int, input().split())
	a[i] = x
	b[i] = y
for i in range(n // 2):
	print('0', end='')
	print('1', end='')
if n % 2 == 1:
	print('0')
else:
	print()


def ni():
	return map(int, input().split())

def toString(aList, sep=' '):
	return sep.join((str(x) for x in aList))

def toMapInvertIndex(aList):
	return {k: v for (v, k) in enumerate(aList)}

def sortId(arr):
	return sorted(range(arr), key=lambda k: arr[k])
(n, m) = ni()
print(('01' * ((n + 1) // 2))[:n])


(n, m) = map(int, input().split())
for _ in range(m):
	(x, y) = map(int, input().split())
cnt = 0
ans = []
for i in range(n):
	if cnt % 2 == 0:
		ans.append('0')
	else:
		ans.append('1')
	cnt += 1
print(''.join(ans))


(n, m) = input().split()
n = int(n)
m = int(m)
for xx in range(m):
	(l, r) = input().split()
ans = ''
flag = 0
for i in range(n):
	if flag == 0:
		ans += '1'
		flag = 1
	else:
		ans += '0'
		flag = 0
print(ans)


(n, _) = map(int, input().split())
for i in range(n):
	print('10'[i % 2], end='')


def solve():
	(n, m) = map(int, input().split())
	ans = ''
	for i in range(n):
		ans += str(i % 2)
	print(ans)
solve()


(n, m) = map(int, input().split())
print(n // 2 * '01', end='')
if n % 2 == 1:
	print('0')


import math
(n, k) = map(int, input().split())
ans = 0
for i in range(1, n + 1):
	if i % 2 == 1:
		print('1', end='')
	else:
		print('0', end='')


(a, b) = input().split()
a = int(a)
b = int(b)
for i in range(b):
	k = input()
if a % 2 == 0:
	print('10' * int(a / 2))
else:
	print('10' * int(a / 2) + '1')


(n, m) = map(int, input().split())
que = []
for _ in range(m):
	que.append(list(map(int, input().split())))
k = ''
c = 0
for i in range(n):
	c ^= 1
	k += str(c)
print(k)


input1 = input()
n = int(input1.split()[0])
m = int(input1.split()[1])
for i in range(m):
	input2 = input()
str = ''
for i in range(n):
	if i % 2 == 0:
		str = str + '0'
	else:
		str = str + '1'
print(str)


import math
from decimal import Decimal
import heapq

def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return (n, b)

def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return (n, b, c)

def dv():
	(n, m) = map(int, input().split())
	return (n, m)

def dva():
	(n, m) = map(int, input().split())
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	return (n, m, b)

def eratosthenes(n):
	sieve = list(range(n + 1))
	for i in sieve:
		if i > 1:
			for j in range(i + i, len(sieve), i):
				sieve[j] = 0
	return sorted(set(sieve))

def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return (n, b, m, c)

def dvs():
	n = int(input())
	m = int(input())
	return (n, m)
(n, m) = map(int, input().split())
for i in range(m):
	s = input()
a = [0, 1]
for i in range(n):
	print(a[i % 2], end='')


def I():
	return [int(i) for i in input().split()]
(n, m) = I()
for i in range(m):
	(l, r) = I()
print('10' * (n // 2) + n % 2 * '1')


lista = list(map(int, input().split()))
n = lista[0]
m = lista[1]
A = ''
for i in range(m):
	listaa = list(map(int, input().split()))
for k in range(n):
	if k % 2 == 0:
		A = A + '0'
	else:
		A = A + '1'
print(A)


(n, m) = map(int, input().split())
l = []
r = []
for i in range(m):
	(a, b) = map(int, input().split())
	l.append(a)
	r.append(b)
ans1 = '10' * n
print(ans1[0:n])


(n, m) = map(int, input().split())
while m > 0:
	(i, j) = map(int, input().split())
	m = m - 1
s = ''
if n % 2 == 0:
	n = n / 2
	while n > 0:
		s = s + '10'
		n = n - 1
else:
	n = n / 2 - 1
	while n > 0:
		s = s + '10'
		n = n - 1
	s = s + '1'
print(s)


from operator import itemgetter

def main():
	(n, m) = map(int, input().split())
	a = []
	for _ in range(m):
		(x, y) = map(int, input().split())
		x -= 1
		y -= 1
		a.append((x, y))
	a = sorted(a, key=itemgetter(0, 1))
	ans = [-1] * n
	for (l, r) in a:
		if ans[l] == -1:
			flag = 1
			for i in range(l, r + 1):
				if flag:
					ans[i] = 1
				else:
					ans[i] = 0
				flag ^= 1
		else:
			flag = 1
			x = ans[l]
			for i in range(l, r + 1):
				if flag:
					ans[i] = x
				else:
					ans[i] = x ^ 1
				flag ^= 1
	for i in range(n):
		if ans[i] == -1:
			ans[i] = 0
	ans = map(str, ans)
	print(''.join(ans))
main()


def i_ints():
	return map(int, input().split())
(n, m) = i_ints()
print(('01' * n)[:n])


(n, k) = map(int, input().split())
for i in range(k):
	(l, r) = map(int, input().split())
l1 = [0]
for i in range(1, n):
	if l1[i - 1] == 0:
		l1.append(1)
	else:
		l1.append(0)
for i in l1:
	print(i, end='')


from sys import stdin, stdout
from collections import deque
(n, m) = map(int, stdin.readline().split())
ans = 0
for i in range(n):
	if i & 1:
		stdout.write('0')
	else:
		stdout.write('1')


(n, m) = (int(x) for x in input().split())
for i in range(m):
	(l, r) = (int(x) for x in input().split())
flag = True
for i in range(n):
	if flag:
		print(0, end='')
		flag = False
	else:
		print(1, end='')
		flag = True


from sys import stdin
all_in = stdin.read().splitlines()
(n, m) = map(int, all_in[0].split())
pos = [tuple(map(int, el.split())) for el in all_in[1:]]
ans = list()
for i in range(1, n + 1):
	ans.append(i % 2)
print(''.join(map(str, ans)))


print(('01' * 999)[:[int(x) for x in input().split()][0]])


(n, k) = [int(i) for i in input().split()]
(maxs, maxt, maxint) = (0, 0, 0)
for i in range(k):
	(s, t) = [int(i) for i in input().split()]
while n > 0:
	if n == 1:
		print('1', end='')
		n -= 1
	if n > 0:
		print('10', end='')
		n -= 2


(n, m) = map(int, input().split())
for _ in range(m):
	(l, r) = map(int, input().split())
s = ''
if n % 2:
	s += '01' * (n // 2) + '0'
else:
	s += '01' * (n // 2)
print(s)


(n, m) = map(int, input().split())
print(''.join((str(i & 1) for i in range(n))))


(n, m) = [int(c) for c in input().split()]
for x in range(m):
	c = input()
for c in range(int(n / 2)):
	print('01', end='')
if n % 2 == 1:
	print('0')


(a, b) = input().split()
for i in range(int(b)):
	(c, d) = input().split()
ea = True
for i in range(int(a)):
	if ea:
		print(0, end='')
	else:
		print(1, end='')
	ea = not ea
print()


td = list(map(int, input().split()))
t = td[0]
d = td[1]
l = []
for i in range(1, t + 1):
	if i % 2 == 0:
		l.append('1')
	else:
		l.append('0')
for i in l:
	print(i, end='')


print(*[x % 2 for x in range(int(input().split()[0]))], sep='')


(n, m) = [int(el) for el in input().split()]
for i in range(m):
	(l, r) = [int(el) for el in input().split()]
s = '01' * (n // 2)
if n % 2 == 1:
	s += '0'
print(s)


n = int(input().split()[0])
l = input()
print('10' * (n // 2) + '1' * (n % 2))


(n, m) = input().split(' ')
n = int(n)
m = int(m)
for i in range(m):
	inp = input()
if n % 2 == 0:
	ans = '01' * (n // 2)
else:
	ans = '01' * ((n - 1) // 2) + '0'
print(ans)


import os
import sys
from io import BytesIO, IOBase
import math
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
(n, m) = map(int, input().split())
for i in range(m):
	(a, b) = map(int, input().split())
for i in range(n):
	print(i % 2, end='')


(n, m) = map(int, input().split(' '))
l = []
r = []
for i in range(m):
	(l_i, r_i) = map(int, input().split(' '))
	l.append(l_i)
	r.append(r_i)
s = ''
for i in range(n):
	if i % 2 == 0:
		s += '0'
	else:
		s += '1'
print(s)


(n, q) = map(int, input().split())
s = '10' * n
print(s[:n])


a = input()
a = a.split(' ')
for i in range(int(a[1])):
	i = input()
ans = ''
for k in range(int(a[0])):
	if k % 2 == 0:
		ans += '0'
	else:
		ans += '1'
print(ans)


(n, m) = map(int, input().split())
list_pos = []
for i in range(m):
	(l, r) = map(int, input().split())
	lr = []
	lr.append(l)
	lr.append(r)
	list_pos.append(lr)
flag = 0
p_str = ''
for i in range(n):
	if flag == 0:
		p_str = p_str + '0'
		flag = 1
	elif flag == 1:
		p_str = p_str + '1'
		flag = 0
print(p_str)


(n, b) = [int(i) for i in input().split()]
for i in range(b):
	(a, c) = [int(i) for i in input().split()]
s = '01' * 501
print(s[0:n])


(n, m) = map(int, input().split())
for i in range(m):
	input()
ans = ''
num = 1
for i in range(n):
	ans += str(num)
	num = 1 - num
print(ans)


(n, m) = map(int, input().split())
asn = list()
for i in range(n):
	asn.append('0' if i % 2 == 0 else '1')
print(str(''.join(asn)))