1998 IMO Shortlist Problems/C4

If A is a permutation of 1, 2, 3, ... , n and B is a subset of {1, 2, ... , n}, then we say that A splits B if we can find three elements of A such that the middle element does not belong to B, but the outer two do. For example, the permutation 13542 of 12345 splits {1, 2, 3} (because, for example, 4 appears between 3 and 2) but it does not split {3, 4, 5}. Show that if we take any n-2 subsets of {1, 2, ... , n}, each with at least 2 and at most n-1 elements, then there is a permutation of 1, 2, ... , n which splits all of them.