import java.util.*;
import java.lang.*;
import java.io.*;
class U415 {
public static void main
(String[] args
) { Scanner scanner
= new Scanner
(System.
in); int n, m;
n = scanner.nextInt();
m = scanner.nextInt();
double[] A = new double[n];
double[] B = new double[m];
double[] C = new double[n + m];
for (int i = 0; i < n; i++) {
A[i] = scanner.nextDouble();
}
for (int i = 0; i < m; i++) {
B[i] = scanner.nextDouble();
}
for (int i = 0; i < n + m; i++){
if (i < n) {
C [i] = A[i];
}
else {
C [i] = B[i - n];
}
}
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBVNDE1IHsKICAgIHB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZ1tdIGFyZ3MpIHsKICAgICAgICBTY2FubmVyIHNjYW5uZXIgPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwogICAgICAgIGludCBuLCBtOwogICAgICAgIG4gPSBzY2FubmVyLm5leHRJbnQoKTsKICAgICAgICBtID0gc2Nhbm5lci5uZXh0SW50KCk7CiAgICAgICAgZG91YmxlW10gQSA9IG5ldyBkb3VibGVbbl07CiAgICAgICAgZG91YmxlW10gQiA9IG5ldyBkb3VibGVbbV07CiAgICAgICAgZG91YmxlW10gQyA9IG5ldyBkb3VibGVbbiArIG1dOwogICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKSB7CiAgICAgICAgICAgIEFbaV0gPSBzY2FubmVyLm5leHREb3VibGUoKTsKICAgICAgICB9CiAgICAgICAgZm9yIChpbnQgaSA9IDA7IGkgPCBtOyBpKyspIHsKICAgICAgICAgICAgQltpXSA9IHNjYW5uZXIubmV4dERvdWJsZSgpOwogICAgICAgIH0KICAgICAgICBmb3IgKGludCBpID0gMDsgaSA8IG4gKyBtOyBpKyspewogICAgICAgICAgICBpZiAoaSA8IG4pIHsKICAgICAgICAgICAgICAgIEMgW2ldID0gQVtpXTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIEMgW2ldID0gQltpIC0gbl07CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKEFycmF5cy50b1N0cmluZyhDKSk7CiAgICB9Cn0=
[9.0, 3.6, 7.4, 3.6, 4.6666, 7.99702, 1.0, 1.0, 1.0, 1.0, 1.0]