Skip to content

Instantly share code, notes, and snippets.

@quantumjim
Created May 23, 2024 13:06
Show Gist options
  • Save quantumjim/8319a17dc0312d12481dc6738af0dda7 to your computer and use it in GitHub Desktop.
Save quantumjim/8319a17dc0312d12481dc6738af0dda7 to your computer and use it in GitHub Desktop.
Quantum Blur Demo
import pew
import quantumblur as qb
from microqiskit import QuantumCircuit
import math
import pics
pew.init()
screen = pew.Pix()
fps = 10
L = 32
def scroll(pix, dx=1):
x = 0
while True:
for x in range(x, pix.width, dx):
screen.box(0)
screen.blit(pix, -x, 1)
yield x
x = -8
def draw_cursor(x, y, undraw=False):
for dx, dy in [(-1, 0), (1, 0), (0, -1), (0, 1)]:
if x + dx in range(L) and y + dy in range(L):
if undraw:
screen.pixel(x + dx, y + dy, 3 * height[x + dx + (y + dy) * L])
else:
screen.pixel(x + dx, y + dy, 2)
pew.show(screen)
def draw_height(height):
max_h = max(height) + 0.01
for x in range(L):
for y in range(L):
h = height[x + y * L] / max_h
b = int(h*pew.COLOR_NUM)
if b==pew.COLOR_NUM:
b = pew.COLOR_NUM-1
screen.pixel(x, y, b)
pew.show(screen)
heights = [
pics.hek,
pics.ibm,
pics.cat,
pics.unibas,
pics.kite,
pics.moth,
pics.lana,
]
while True:
running = True
theta = math.pi / 100
last_idle = False
ldX, ldY, ldb = 0, 0, 0
log = False
p = 0
draw_height(heights[p])
qc = qb.height2circuit(heights[p])
gates = [['x',0]]
while running:
rdX, rdY, rdb = 0, 0, None
keys = pew.keys()
if keys & pew.K_UP:
rdY = +1
elif keys & pew.K_DOWN:
rdY = -1
if keys & pew.K_LEFT:
rdX = -1
elif keys & pew.K_RIGHT:
rdX = +1
if keys & pew.K_O or keys & pew.K_X:
if keys & pew.K_X:
rdb = 0
else:
rdb = +1
dX, dY, db = 0, 0, None
if rdX != ldX:
dX = rdX
if rdY != ldY:
dY = rdY
if rdb != ldb:
db = rdb
ldX, ldY, ldb = rdX, rdY, rdb
if db is not None:
p = (p+rdb)%len(heights)
draw_height(heights[p])
qc = qb.height2circuit(heights[p])
gates = [['x',0]]
if rdX:
if gates[-1][0]=='x':
gates[-1][1] += rdX
else:
gates.append(['x', rdX])
if rdY:
if gates[-1][0]=='x2':
gates[-1][1] += rdY
else:
gates.append(['x2', rdY])
qc_rot = QuantumCircuit(qc.num_qubits)
reg = int(qc_rot.num_qubits / 2)
for gate in gates:
if gate[0]=='x':
for q in range(reg):
qc_rot.cx(q, q+reg)
qc_rot.crx(gate[1] * theta, q+reg, q)
qc_rot.cx(q, q+reg)
else:
for j in range(reg):
for q in [j, reg + j]:
qc_rot.rx(gate[1] * theta * 2 * 2**(-j), q)
draw_height(qb.circuit2height(qc + qc_rot, log=log))
pew.tick(1 / fps)
import random
from math import cos,sin,pi
r2=0.70710678118
class QuantumCircuit:
def __init__(self,n,m=0):
self.num_qubits=n
self.num_clbits=m
self.name = ''
self.data=[]
def __add__(self,self2):
self3=QuantumCircuit(max(self.num_qubits,self2.num_qubits),max(self.num_clbits,self2.num_clbits))
self3.data=self.data+self2.data
self3.name = self.name
return self3
def initialize(self,k):
self.data[:] = []
self.data.append(('init',[e for e in k]))
def x(self,q):
self.data.append(('x',q))
def rx(self,theta,q):
self.data.append(('rx',theta,q))
def rz(self,theta,q):
self.data.append(('rz',theta,q))
def h(self,q):
self.data.append(('h',q))
def cx(self,s,t):
self.data.append(('cx',s,t))
def crx(self,theta,s,t):
self.data.append(('crx',theta,s,t))
def measure(self,q,b):
assert b<self.num_clbits, 'Index for output bit out of range.'
assert q<self.num_qubits, 'Index for qubit out of range.'
self.data.append(('m',q,b))
def ry(self,theta,q):
self.rx(pi/2,q)
self.rz(theta,q)
self.rx(-pi/2,q)
def z(self,q):
self.rz(pi,q)
def y(self,q):
self.rz(pi,q)
self.x(q)
def simulate(qc,shots=1024,get='counts',noise_model=[]):
def superpose(x,y):
return [r2*(x[j]+y[j])for j in range(2)],[r2*(x[j]-y[j])for j in range(2)]
def turn(x,y,theta):
theta = float(theta)
return [x[0]*cos(theta/2)+y[1]*sin(theta/2),x[1]*cos(theta/2)-y[0]*sin(theta/2)],[y[0]*cos(theta/2)+x[1]*sin(theta/2),y[1]*cos(theta/2)-x[0]*sin(theta/2)]
def phaseturn(x,y,theta):
theta = float(theta)
return [[x[0]*cos(theta/2) - x[1]*sin(-theta/2),x[1]*cos(theta/2) + x[0]*sin(-theta/2)],[y[0]*cos(theta/2) - y[1]*sin(+theta/2),y[1]*cos(theta/2) + y[0]*sin(+theta/2)]]
k = [[0,0] for _ in range(2**qc.num_qubits)]
k[0] = [1.0,0.0]
if noise_model:
if type(noise_model)==float:
noise_model = [noise_model]*qc.num_qubits
outputnum_clbitsap = {}
for gate in qc.data:
if gate[0]=='init':
if type(gate[1][0])==list:
k = [e for e in gate[1]]
else:
k = [[e,0] for e in gate[1]]
elif gate[0]=='m':
outputnum_clbitsap[gate[2]] = gate[1]
elif gate[0] in ['x','h','rx','rz']:
j = gate[-1]
for i0 in range(2**j):
for i1 in range(2**(qc.num_qubits-j-1)):
b0=i0+2**(j+1)*i1
b1=b0+2**j
if gate[0]=='x':
k[b0],k[b1]=k[b1],k[b0]
elif gate[0]=='h':
k[b0],k[b1]=superpose(k[b0],k[b1])
elif gate[0]=='rx':
theta = gate[1]
k[b0],k[b1]=turn(k[b0],k[b1],theta)
elif gate[0]=='rz':
theta = gate[1]
k[b0],k[b1]=phaseturn(k[b0],k[b1],theta)
elif gate[0] in ['cx','crx']:
if gate[0]=='cx':
[s,t] = gate[1:]
else:
theta = gate[1]
[s,t] = gate[2:]
[l,h] = sorted([s,t])
for i0 in range(2**l):
for i1 in range(2**(h-l-1)):
for i2 in range(2**(qc.num_qubits-h-1)):
b0=i0+2**(l+1)*i1+2**(h+1)*i2+2**s
b1=b0+2**t
if gate[0]=='cx':
k[b0],k[b1]=k[b1],k[b0]
else:
k[b0],k[b1]=turn(k[b0],k[b1],theta)
if get=='statevector':
return k
else:
probs = [e[0]**2+e[1]**2 for e in k]
if noise_model:
for j in range(qc.num_qubits):
p_meas = noise_model[j]
for i0 in range(2**j):
for i1 in range(2**(qc.num_qubits-j-1)):
b0=i0+2**(j+1)*i1
b1=b0+2**j
p0 = probs[b0]
p1 = probs[b1]
probs[b0] = (1-p_meas)*p0 + p_meas*p1
probs[b1] = (1-p_meas)*p1 + p_meas*p0
if get=='probabilities_dict':
return {('{0:0'+str(qc.num_qubits)+'b}').format(j):p for j,p in enumerate(probs)}
elif get in ['counts', 'memory']:
m = [False for _ in range(qc.num_qubits)]
for gate in qc.data:
for j in range(qc.num_qubits):
assert not ((gate[-1]==j) and m[j]), 'Incorrect or missing measure command.'
m[j] = (gate==('m',j,j))
m=[]
for _ in range(shots):
cumu=0
un=True
r=random.random()
for j,p in enumerate(probs):
cumu += p
if r<cumu and un:
raw_out=('{0:0'+str(qc.num_qubits)+'b}').format(j)
out_list = ['0']*qc.num_clbits
for bit in outputnum_clbitsap:
out_list[qc.num_clbits-1-bit] = raw_out[qc.num_qubits-1-outputnum_clbitsap[bit]]
out = ''.join(out_list)
m.append(out)
un=False
if get=='memory':
return m
else:
counts = {}
for out in m:
if out in counts:
counts[out] += 1
else:
counts[out] = 1
return counts
# (c) Copyright 2019 by Radomir Dopieralski.
# This work is licensed under a Creative Commons
# Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) License
# (http://creativecommons.org/licenses/by-sa/4.0/).
# From https://github.com/pewpew-game/pew-pygame
import pygame
_PALETTE = [
'#030200',
'#2D1B00',
'#572700',
'#812600',
'#AB1A00',
'#D50400',
'#FF001D',
'#F22940',
'#E94E60',
'#E3717E',
'#DF9099',
'#DFACB2',
'#E2C5C9',
'#E8DBDD',
'#F1EEEE',
'#FEFEFE',
]
_PALETTE = [
'#030200',
'#221600',
'#422300',
'#612800',
'#812600',
'#A01E00',
'#C01000',
'#DF0000',
'#FF001D',
'#FA102B',
'#F52038',
'#F12F45',
'#ED3E52',
'#E94D5E',
'#E65B6A',
'#E46876',
'#E27581',
'#E0818C',
'#DF8D97',
'#DF99A1',
'#DFA4AB',
'#DFAEB4',
'#E0B9BD',
'#E2C2C6',
'#E3CBCE',
'#E6D4D6',
'#E9DCDE',
'#ECE4E5',
'#F0EBEC',
'#F4F2F2',
'#F9F8F8',
'#FEFEFE',
]
COLOR_NUM = len(_PALETTE)
#_PALETTE = []
#for j in range(COLOR_NUM):
# b = int(255*j/(COLOR_NUM-1))
# _PALETTE.append((b,b,b))
_FONT = (
b'{{{{{{wws{w{HY{{{{YDYDY{sUtGUsH[wyH{uHgHE{ws{{{{vyxyv{g[K[g{{]f]{{{wDw{{'
b'{{{wy{{{D{{{{{{{w{K_w}x{VHLHe{wuwww{`KfyD{UKgKU{w}XDK{DxTKT{VxUHU{D[wyx{'
b'UHfHU{UHEKe{{w{w{{{w{wy{KwxwK{{D{D{{xwKwx{eKg{w{VIHyB{fYH@H{dHdHd{FyxyF{'
b'`XHX`{DxtxD{Dxtxx{FyxIF{HHDHH{wwwww{KKKHU{HXpXH{xxxxD{Y@DLH{IL@LX{fYHYf{'
b'`HH`x{fYHIF{`HH`H{UxUKU{Dwwww{HHHIR{HHH]w{HHLD@{HYsYH{HYbww{D[wyD{txxxt{'
b'x}w_K{GKKKG{wLY{{{{{{{{Dxs{{{{{BIIB{x`XX`{{ByyB{KBIIB{{WIpF{OwUwww{`YB[`'
b'x`XHH{w{vwc{K{OKHUxHpXH{vwws_{{dD@H{{`XHH{{fYYf{{`XX`x{bYIBK{Ipxx{{F}_d{'
b'wUws_{{HHIV{{HH]s{{HLD@{{HbbH{{HHV[a{D_}D{Cw|wC{wwwwwwpwOwp{WKfxu{@YYY@{'
)
_SALT = 132
K_X = 0x01
K_DOWN = 0x02
K_LEFT = 0x04
K_RIGHT = 0x08
K_UP = 0x10
K_O = 0x20
_KEYMAP = {
pygame.K_x: K_X,
pygame.K_z: K_O,
pygame.K_UP: K_UP,
pygame.K_DOWN: K_DOWN,
pygame.K_LEFT: K_LEFT,
pygame.K_RIGHT: K_RIGHT,
}
L = 32
w = 1.8*int(55*8/L)
def init():
global _display, _clock, _keys
pygame.display.init()
_display = pygame.display.set_mode((L * w, L * w))
_clock = pygame.time.Clock()
_keys = 0x00
def brightness(level):
global _brightness
_brightness = level
def show(pix):
for y in range(L):
for x in range(L):
pygame.draw.rect(_display, _PALETTE[pix.pixel(x, y)],
(x * w + 1, y * w + 1, w - 2, w - 2), 0)
pygame.display.flip()
def keys():
global _keys
pressed = 0x00
for event in pygame.event.get():
if event.type == pygame.QUIT:
raise SystemExit()
elif event.type == pygame.KEYDOWN:
_keys |= _KEYMAP.get(event.key, 0)
elif event.type == pygame.KEYUP:
_keys &= ~(_KEYMAP.get(event.key, 0xff))
pressed |= _keys
pressed |= _keys
if pressed & 0b011110 == 0b011110:
raise GameOver()
return pressed
def tick(delay):
_clock.tick(1 / delay)
class GameOver(Exception):
pass
class Pix:
def __init__(self, width=L, height=L, buffer=None):
if buffer is None:
buffer = bytearray(width * height)
self.buffer = buffer
self.width = width
self.height = height
@classmethod
def from_text(cls, string, color=None, bgcolor=0, colors=None):
pix = cls(4 * len(string), 6)
font = memoryview(_FONT)
if colors is None:
if color is None:
colors = (3, 2, bgcolor, bgcolor)
else:
colors = (color, color, bgcolor, bgcolor)
x = 0
for c in string:
index = ord(c) - 0x20
if not 0 <= index <= 95:
continue
row = 0
for byte in font[index * 6:index * 6 + 6]:
unsalted = byte ^ _SALT
for col in range(4):
pix.pixel(x + col, row, colors[unsalted & 0x03])
unsalted >>= 2
row += 1
x += 4
return pix
@classmethod
def from_iter(cls, lines):
pix = cls(len(lines[0]), len(lines))
y = 0
for line in lines:
x = 0
for pixel in line:
pix.pixel(x, y, pixel)
x += 1
y += 1
return pix
def pixel(self, x, y, color=None):
if not 0 <= x < self.width or not 0 <= y < self.height:
return 0
if color is None:
return self.buffer[x + y * self.width]
self.buffer[x + y * self.width] = int(color)
def box(self, color, x=0, y=0, width=None, height=None):
x = min(max(x, 0), self.width - 1)
y = min(max(y, 0), self.height - 1)
width = max(0, min(width or self.width, self.width - x))
height = max(0, min(height or self.height, self.height - y))
for y in range(y, y + height):
xx = y * self.width + x
for i in range(width):
self.buffer[xx] = color
xx += 1
def blit(self,
source,
dx=0,
dy=0,
x=0,
y=0,
width=None,
height=None,
key=None):
if dx < 0:
x -= dx
dx = 0
if x < 0:
dx -= x
x = 0
if dy < 0:
y -= dy
dy = 0
if y < 0:
dy -= y
y = 0
width = min(min(width or source.width, source.width - x),
self.width - dx)
height = min(min(height or source.height, source.height - y),
self.height - dy)
source_buffer = memoryview(source.buffer)
self_buffer = self.buffer
if key is None:
for row in range(height):
xx = y * source.width + x
dxx = dy * self.width + dx
self_buffer[dxx:dxx + width] = source_buffer[xx:xx + width]
y += 1
dy += 1
else:
for row in range(height):
xx = y * source.width + x
dxx = dy * self.width + dx
for col in range(width):
color = source_buffer[xx]
if color != key:
self_buffer[dxx] = color
dxx += 1
xx += 1
y += 1
dy += 1
def __str__(self):
return "\n".join("".join(('.', '+', '*', '@')[self.pixel(x, y)]
for x in range(self.width))
for y in range(self.height))
hek = [0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666]
ibm = [0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 1, 1, 1, 1, 1, 1, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 1, 1, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 1, 1, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 1, 1, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.001, 1, 1, 1, 1, 1, 1, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 1, 1, 1, 1, 1, 1, 1, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 1, 1, 0.001, 0.001, 0.001, 1, 1, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 1, 1, 1, 1, 1, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 1, 1, 0.001, 0.001, 0.001, 1, 1, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 0.001, 1, 1, 1, 1, 1, 1, 1, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 1, 1, 0.001, 0.001, 0.001, 0.001, 0.001, 1, 1, 0.001, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 1, 1, 0.001, 0.001, 0.001, 1, 1, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 1, 0.001, 1, 0.001, 1, 0.001, 1, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 1, 0.001, 0.001, 1, 0.001, 0.001, 1, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 1, 1, 0.001, 0.001, 0.001, 0.001, 0.001, 1, 1, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001]
cat = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 1, 1e-3, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 1, 1e-3, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 0.3333333333333333, 1e-3, 0.3333333333333333, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.3333333333333333, 1e-3, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 1, 1, 1, 0.3333333333333333, 1, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1e-3, 0.3333333333333333, 1e-3, 0.3333333333333333, 1, 1e-3, 0.3333333333333333, 0.3333333333333333, 1e-3, 1, 1, 1e-3, 0.3333333333333333, 1e-3, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 1, 1e-3, 1, 0.3333333333333333, 0.6666666666666666, 0.3333333333333333, 1, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 1, 1, 1e-3, 1e-3, 1e-3, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 0.3333333333333333, 0.3333333333333333, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 1, 1, 1, 0.3333333333333333, 1, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 1e-3, 0.3333333333333333, 1e-3, 0.3333333333333333, 1e-3, 1e-3, 1, 1, 1, 1, 1, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1, 1, 1e-3, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 1, 1e-3, 1, 1, 1, 1, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1, 1, 1, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 1, 1, 1, 1e-3, 1, 1, 1e-3, 0.3333333333333333, 1e-3, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1, 1e-3, 1e-3, 1, 1, 1e-3, 0.3333333333333333, 0.3333333333333333, 1e-3, 1e-3, 1, 1, 1, 1e-3, 1e-3, 1, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1, 1, 1, 1e-3, 1, 1, 1e-3, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 1, 1e-3, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1e-3, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1e-3, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1e-3, 0.3333333333333333, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 0.3333333333333333, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1, 1e-3, 1, 0.3333333333333333, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 1, 1e-3, 1e-3, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1, 1, 1, 1, 1, 1, 1e-3, 1, 1e-3, 1, 1, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 1e-3, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1, 1, 1, 1, 1, 1e-3, 1, 1e-3, 1, 1, 0.3333333333333333, 1e-3, 1, 1, 1e-3, 1e-3, 1e-3, 1, 1, 0.3333333333333333, 0.3333333333333333, 1e-3, 1, 1, 1, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1, 1, 1, 1e-3, 1e-3, 1e-3, 1, 0.3333333333333333, 0.3333333333333333, 1e-3, 1e-3, 1e-3, 1e-3, 0.3333333333333333, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.3333333333333333, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 0.6666666666666666, 0.6666666666666666, 1, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 1e-3, 0.3333333333333333, 0.3333333333333333, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 0.3333333333333333, 1, 1, 1, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.3333333333333333, 0.3333333333333333, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
kite = [0, 1e-3, 1e-3, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1e-3, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 1, 1e-3, 0.6666666666666666, 0.3333333333333333, 1, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 1e-3, 0.6666666666666666, 0.3333333333333333, 1, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1e-3, 1e-3, 1, 1, 1, 1, 1e-3, 1e-3, 0.3333333333333333, 1, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1e-3, 1, 1, 1, 1, 1e-3, 1e-3, 1, 1, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1, 1, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1, 0.3333333333333333, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1, 1, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1, 1, 1e-3, 0]
moth = [0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1e-3, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 0.3333333333333333, 1e-3, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1e-3, 1, 1, 1e-3, 0.6666666666666666, 1e-3, 0.3333333333333333, 0.3333333333333333, 1e-3, 1, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1, 1e-3, 1, 1, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1, 1, 1, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1, 1e-3, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1, 1e-3, 1e-3, 1, 1, 1, 1e-3, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.3333333333333333, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1e-3, 1e-3, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 1e-3, 0.3333333333333333, 0.3333333333333333, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1, 1e-3, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1, 0.3333333333333333, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 1e-3, 0.3333333333333333, 0.3333333333333333, 1, 1, 1e-3, 1, 1, 1, 1, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 0.3333333333333333, 1e-3, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 0.3333333333333333, 1e-3, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 1e-3, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1e-3, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1, 0.3333333333333333, 0.3333333333333333, 1e-3, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 0.3333333333333333, 1e-3, 1e-3, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.3333333333333333, 1e-3, 1e-3, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 1, 1, 1e-3, 1e-3, 1e-3, 1, 1, 1, 1e-3, 0.3333333333333333, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1, 1, 1, 1, 1e-3, 1e-3, 1, 1, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1, 1, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1, 1, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 1e-3, 1e-3, 1e-3, 1e-3, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666, 0.6666666666666666]
flag = [0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 1, 1, 1, 1, 1, 1, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.001, 1, 1, 1, 1, 1, 1, 0.001, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.001, 1, 1, 1, 1, 1, 1, 0.001, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.3333333333333333, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.3333333333333333, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.001, 1, 1, 1, 1, 1, 1, 0.001, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.001, 1, 1, 1, 1, 1, 1, 0.001, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 1, 1, 1, 1, 1, 1, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.3333333333333333, 1, 1, 1, 1, 1, 1, 0.3333333333333333, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.001, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.3333333333333333, 0.001, 0.001]
unibas = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 0.001, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 0.001, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 0.001, 1, 0.001, 1, 1, 1, 1, 1, 1, 0.001, 1, 0.001, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 0.6666666666666666, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 0.6666666666666666, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 1, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 1, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 0.6666666666666666, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 0.6666666666666666, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 0.001, 1, 0.001, 1, 1, 1, 1, 1, 1, 0.001, 1, 0.001, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 0.001, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 0.001, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 0.001, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 0.001, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 0.001, 1, 0.001, 1, 1, 1, 1, 1, 1, 0.001, 1, 0.001, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 0.6666666666666666, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 0.6666666666666666, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 1, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.6666666666666666, 1, 0.6666666666666666, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 0.6666666666666666, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 0.6666666666666666, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 0.001, 1, 0.001, 1, 1, 1, 1, 1, 1, 0.001, 1, 0.001, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 0.001, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 0.001, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 0.6666666666666666, 0.6666666666666666, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
lana = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.25, 0.25, 0.25, 0.25, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 1, 1, 1, 1, 1, 1, 0.001, 0.001, 1, 1, 0.001, 0.001, 0.001, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.25, 0.25, 0.25, 0.25, 0.5, 0.5, 0.5, 0.25, 0.25, 1, 1, 1, 1, 1, 0.001, 0.001, 0.001, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.25, 0.25, 0.5, 0.5, 0.5, 0.25, 0.25, 0.5, 0.25, 0.25, 0.25, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.5, 0.5, 0.5, 0.75, 0.5, 0.5, 0.25, 0.5, 0.25, 0.25, 0.25, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.25, 0.75, 0.75, 0.5, 0.5, 0.25, 0.25, 0.75, 0.75, 0.25, 0.25, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.25, 0.25, 0.25, 0.25, 0.75, 0.75, 0.5, 0.5, 0.25, 0.75, 0.25, 0.25, 0.25, 0.25, 0.001, 0.25, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.25, 0.25, 0.25, 0.75, 0.75, 0.75, 0.5, 0.5, 0.5, 0.75, 0.25, 0.25, 0.25, 0.25, 0.001, 0.25, 0.25, 0.25, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.25, 0.25, 0.75, 0.25, 0.75, 1, 0.5, 0.5, 0.25, 0.25, 0.25, 0.25, 0.25, 0.001, 0.25, 0.25, 0.75, 0.25, 0.25, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.25, 0.25, 0.25, 0.75, 0.75, 0.5, 0.5, 0.75, 0.5, 0.25, 0.25, 0.25, 0.25, 0.001, 0.25, 0.25, 0.25, 0.25, 0.75, 0.25, 0.25, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.25, 0.25, 0.25, 0.75, 1, 0.5, 0.75, 0.75, 0.5, 0.25, 0.25, 0.25, 0.001, 0.25, 0.25, 0.5, 0.25, 0.25, 0.75, 0.25, 0.25, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.25, 0.25, 0.25, 1, 0.5, 0.25, 0.25, 0.5, 0.25, 0.75, 0.25, 0.001, 0.25, 0.25, 0.5, 0.5, 0.75, 0.25, 0.75, 0.25, 0.25, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.25, 0.25, 1, 0.25, 0.25, 0.25, 0.5, 0.75, 0.25, 0.001, 0.25, 0.5, 0.5, 0.75, 0.25, 0.25, 0.25, 0.75, 0.25, 0.25, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.25, 0.25, 0.75, 0.5, 0.5, 0.5, 0.25, 0.25, 0.001, 0.25, 0.5, 0.25, 0.75, 0.75, 0.25, 0.25, 0.25, 0.5, 0.25, 0.25, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.25, 0.75, 0.25, 0.25, 0.25, 0.25, 0.001, 0.5, 0.25, 0.25, 0.5, 0.75, 0.5, 0.25, 0.25, 0.5, 0.25, 0.25, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.25, 0.25, 0.25, 0.25, 0.25, 0.001, 0.5, 0.5, 0.5, 0.75, 0.5, 0.25, 0.25, 0.5, 0.25, 0.25, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.25, 0.25, 0.25, 0.25, 0.001, 0.25, 0.25, 0.5, 0.75, 0.25, 0.25, 0.25, 0.5, 0.5, 0.25, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 0.001, 0.25, 0.75, 0.25, 0.25, 0.75, 0.25, 0.25, 0.25, 0.25, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 0.25, 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, 0.25, 0.25, 0.25, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.25, 0.25, 0.75, 0.25, 0.25, 0.75, 0.25, 0.25, 0.25, 0.25, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 1, 1, 1, 1, 1, 1, 0.001, 1, 0.001, 1, 0.001, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.25, 0.25, 0.25, 1, 1, 1, 1, 1, 1, 1, 0.001, 1, 1, 0.001, 1, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.001, 0.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
# -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2020s.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.
import math
import random
from microqiskit import QuantumCircuit, simulate
simple_python = True
def _kron(vec0, vec1):
new_vec = []
for amp0 in vec0:
for amp1 in vec1:
new_vec.append(amp0 * amp1)
return new_vec
def _get_size(height):
L = int(math.sqrt(len(height)))
return L, L
def circuit2probs(qc):
ket = simulate(qc, get='statevector')
probs = []
for amp in ket:
try:
probs.append(amp[0]**2 + amp[1]**2)
except:
probs.append(amp**2)
return probs
def make_line(length):
# number of bits required
n = int(math.ceil(math.log(length) / math.log(2)))
# iteratively build list
line = ['0', '1']
for j in range(n - 1):
# first append a reverse-ordered version of the current list
line = line + line[::-1]
# then add a '0' onto the end of all bit strings in the first half
for j in range(int(float(len(line)) / 2)):
line[j] += '0'
# and a '1' for the second half
for j in range(int(float(len(line)) / 2), int(len(line))):
line[j] += '1'
return line
def normalize(ket):
N = 0
for amp in ket:
try:
N += amp[0] * amp[0] + amp[1] * amp[1]
except:
N += amp**2
for j, amp in enumerate(ket):
ket[j] = float(amp) / math.sqrt(N)
return ket
def make_grid(Lx, Ly=None):
# set Ly if not supplied
if not Ly:
Ly = Lx
# make the lines
line_x = make_line(Lx)
line_y = make_line(Ly)
# make the grid
grid = {}
for x in range(Lx):
for y in range(Ly):
grid[line_x[x] + line_y[y]] = (x, y)
# determine length of the bit strings
n = len(line_x[0] + line_y[0])
return grid, n
def height2circuit(height, eps=1e-2):
# get bit strings for the grid
Lx, Ly = _get_size(height)
grid, n = make_grid(Lx, Ly)
# create required state vector
state = [0] * (2**n)
for bitstring in grid:
(x, y) = grid[bitstring]
h = height[x + y * Lx]
state[int(bitstring, 2)] = math.sqrt(h)
state = normalize(state)
# define and initialize quantum circuit
qc = QuantumCircuit(n)
# microqiskit style
qc.initialize(state)
qc.name = '(' + str(Lx) + ',' + str(Ly) + ')'
return qc
def probs2height(probs, size=None, log=False):
# get grid info
if size:
(Lx, Ly) = size
else:
Lx = int(2**(len(list(probs.keys())[0]) / 2))
Ly = Lx
grid, n = make_grid(Lx, Ly)
# set height to probs value, rescaled such that the maximum is 1
max_h = max(probs)
height = [0] * (Lx * Ly)
for j, prob in enumerate(probs):
bitstring = ('{0:0' + str(n) + 'b}').format(j)
if bitstring in grid:
x, y = grid[bitstring]
height[x + y * Lx] = float(probs[j]) / max_h
# take logs if required
if log:
hs = []
for h in height:
if h!=0:
hs.append(h)
min_h = min(hs)
base = 1/min_h
for pos in range(len(height)):
if height[pos]>0:
height[pos] = max(math.log(height[pos]/min_h)/math.log(base),0)
else:
height[pos] = 0.0
return height
def circuit2height(qc, log=False):
probs = circuit2probs(qc)
try:
# get size from circuit
size = eval(qc.name)
except:
# if not in circuit name, infer it from qubit number
L = int(2**(qc.num_qubits / 2))
size = (L, L)
return probs2height(probs, size=size, log=log)
def combine_circuits(qc0, qc1):
warning = "Combined circuits should contain only initialization."
# create a circuit with the combined number of qubits
num_qubits = qc0.num_qubits + qc1.num_qubits
combined_qc = QuantumCircuit(num_qubits)
# extract statevectors for any initialization commands
kets = [None, None]
for j, qc in enumerate([qc0, qc1]):
for gate in qc.data:
assert gate[0] == 'init', warning
kets[j] = gate[1]
# combine into a statevector for all the qubits
ket = None
if kets[0] and kets[1]:
ket = _kron(kets[0], kets[1])
elif kets[0]:
ket = _kron(kets[0], [1] + [0] * (2**qc1.num_qubits - 1))
elif kets[1]:
ket = _kron([1] + [0] * (2**qc0.num_qubits - 1), kets[1])
# use this to initialize
if ket:
combined_qc.initialize(ket)
# prevent circuit name from being used for size determination
combined_qc.name = 'None'
return combined_qc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment