from os import *
from io import *

def printTest1(testNo, i):
	if not (path.exists("../tests")):
		mkdir("../tests")
	tst = open("../tests/%d%d" % divmod(testNo, 10), "w")
	tst.write(str(test1_a[0]) + " " + str(test1_b[0]) + "\n"
		 +str(test1_c[0]) + " " + str(test1_d[0]) + "\n"
		 +str(test_x[i]) + "-" + str(test_y[i]) + "\n");
	tst.close()

def printTest2(testNo, i):
	if not (path.exists("../tests")):
		mkdir("../tests")
	tst = open("../tests/%d%d" % divmod(testNo, 10), "w")
	tst.write(str(test2_a[0]) + " " + str(test2_b[0]) + "\n"
		 +str(test2_c[0]) + " " + str(test2_d[0]) + "\n"
		 +str(test_x[i]) + "-" + str(test_y[i]) + "\n");
	tst.close()

def printTest3(testNo, i):
	if not (path.exists("../tests")):
		mkdir("../tests")
	tst = open("../tests/%d%d" % divmod(testNo, 10), "w")
	tst.write(str(test3_a[0]) + " " + str(test3_b[0]) + "\n"
		 +str(test3_c[0]) + " " + str(test3_d[0]) + "\n"
		 +str(test_x[i]) + "-" + str(test_y[i]) + "\n");
	tst.close()

def printTest4(testNo, i):
	if not (path.exists("../tests")):
		mkdir("../tests")
	tst = open("../tests/%d%d" % divmod(testNo, 10), "w")
	tst.write(str(test4_a[0]) + " " + str(test4_b[0]) + "\n"
		 +str(test4_c[0]) + " " + str(test4_d[0]) + "\n"
		 +str(test_x[i]) + "-" + str(test_y[i]) + "\n");
	tst.close()

def printTest5(testNo, i):
	if not (path.exists("../tests")):
		mkdir("../tests")
	tst = open("../tests/%d%d" % divmod(testNo, 10), "w")
	tst.write(str(test5_a[0]) + " " + str(test5_b[0]) + "\n"
		 +str(test5_c[0]) + " " + str(test5_d[0]) + "\n"
		 +str(test_x[i]) + "-" + str(test_y[i]) + "\n");
	tst.close()

def printTest6(testNo, i):
	if not (path.exists("../tests")):
		mkdir("../tests")
	tst = open("../tests/%d%d" % divmod(testNo, 10), "w")
	tst.write(str(test6_a[0]) + " " + str(test6_b[0]) + "\n"
		 +str(test6_c[0]) + " " + str(test6_d[0]) + "\n"
		 +str(test_x[i]) + "-" + str(test_y[i]) + "\n");
	tst.close()

def printTest7(testNo, i):
	if not (path.exists("../tests")):
		mkdir("../tests")
	tst = open("../tests/%d%d" % divmod(testNo, 10), "w")
	tst.write(str(test7_a[0]) + " " + str(test7_b[0]) + "\n"
		 +str(test7_c[0]) + " " + str(test7_d[0]) + "\n"
		 +str(test_x[i]) + "-" + str(test_y[i]) + "\n");
	tst.close()

def printTest8(testNo, i):
	if not (path.exists("../tests")):
		mkdir("../tests")
	tst = open("../tests/%d%d" % divmod(testNo, 10), "w")
	tst.write(str(test8_a[0]) + " " + str(test8_b[0]) + "\n"
		 +str(test8_c[0]) + " " + str(test8_d[0]) + "\n"
		 +str(test_x[i]) + "-" + str(test_y[i]) + "\n");
	tst.close()

def printTest9(testNo, i):
	if not (path.exists("../tests")):
		mkdir("../tests")
	tst = open("../tests/%d%d" % divmod(testNo, 10), "w")
	tst.write(str(test9_a[0]) + " " + str(test9_b[0]) + "\n"
		 +str(test9_c[0]) + " " + str(test9_d[0]) + "\n"
		 +str(test_x[i]) + "-" + str(test_y[i]) + "\n");
	tst.close()

def printTest10(testNo, i):
	if not (path.exists("../tests")):
		mkdir("../tests")
	tst = open("../tests/%d%d" % divmod(testNo, 10), "w")
	tst.write(str(test10_a[0]) + " " + str(test10_b[0]) + "\n"
		 +str(test10_c[0]) + " " + str(test10_d[0]) + "\n"
		 +str(test_x[i]) + "-" + str(test_y[i]) + "\n");
	tst.close()





test1_a = [0.7]
test1_b = [0.3]
test1_c = [0.54]
test1_d = [0.46]

test2_a = [0.5]
test2_b = [0.5]
test2_c = [0.5]
test2_d = [0.5]

test3_a = [1]
test3_b = [0]
test3_c = [0]
test3_d = [1]

test4_a = [1]
test4_b = [0]
test4_c = [1]
test4_d = [0]

test5_a = [0]
test5_b = [1]
test5_c = [0]
test5_d = [1]

test6_a = [0]
test6_b = [1]
test6_c = [1]
test6_d = [0]

test7_a = [0.45347589345]
test7_b = [0.54652410655]
test7_c = [0.34573498383]
test7_d = [0.65426501617]

test8_a = [0.238957982343]
test8_b = [0.761042017657]
test8_c = [0.435374834811]
test8_d = [0.564625165189]

test9_a = [0.999999]
test9_b = [0.000001]
test9_c = [0.999999]
test9_d = [0.000001]


test10_a = [0.999999]
test10_b = [0.000001]
test10_c = [0.000001]
test10_d = [0.999999]

test_x = [4, 4, 4, 4, 3, 2, 1, 0]
test_y = [0, 1, 2, 3, 4, 4, 4, 4]

testNo = 0

for i in range(8):
	testNo = testNo + 1
	printTest1(testNo, i);

for i in range(8):
	testNo = testNo + 1
	printTest2(testNo, i);

for i in range(8):
	testNo = testNo + 1
	printTest3(testNo, i);

for i in range(8):
	testNo = testNo + 1
	printTest4(testNo, i);

for i in range(8):
	testNo = testNo + 1
	printTest5(testNo, i);

for i in range(8):
	testNo = testNo + 1
	printTest6(testNo, i);

for i in range(8):
	testNo = testNo + 1
	printTest7(testNo, i);

for i in range(8):
	testNo = testNo + 1
	printTest8(testNo, i);

for i in range(8):
	testNo = testNo + 1
	printTest9(testNo, i);

for i in range(8):
	testNo = testNo + 1
	printTest10(testNo, i);

