import java.util.*;
import java.lang.*;
class Main
{
{
List
<Integer
> list1
= Arrays.
asList(1,
2,
3,
4); List
<Integer
> list2
= Arrays.
asList(2,
3,
4,
6,
7); List<Integer> union = new ArrayList<Integer>(list1);
union.addAll(list2);
List<Integer> intersection = new ArrayList<Integer>(list1);
intersection.retainAll(list2);
union.removeAll(intersection);
}
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CgpjbGFzcyBNYWluCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewogICAgTGlzdDxJbnRlZ2VyPiBsaXN0MSA9IEFycmF5cy5hc0xpc3QoMSwgMiwgMywgNCk7CiAgICBMaXN0PEludGVnZXI+IGxpc3QyID0gQXJyYXlzLmFzTGlzdCgyLCAzLCA0LCA2LCA3KTsKICAgIExpc3Q8SW50ZWdlcj4gdW5pb24gPSBuZXcgQXJyYXlMaXN0PEludGVnZXI+KGxpc3QxKTsKICAgIHVuaW9uLmFkZEFsbChsaXN0Mik7CiAgICBMaXN0PEludGVnZXI+IGludGVyc2VjdGlvbiA9IG5ldyBBcnJheUxpc3Q8SW50ZWdlcj4obGlzdDEpOwogICAgaW50ZXJzZWN0aW9uLnJldGFpbkFsbChsaXN0Mik7CiAgICB1bmlvbi5yZW1vdmVBbGwoaW50ZXJzZWN0aW9uKTsKICAgIGZvciAoSW50ZWdlciBuIDogdW5pb24pIHsKICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4obik7CiAgICB9Cgl9Cn0=