import java.util.*; public class Main { static int M = 10; static int n, m, p, cnt = M, res; static StringBuilder cd = new StringBuilder(); static BitSet cdBit = new BitSet(); static StringBuilder[] jh = new StringBuilder[M]; static BitSet jhAll = new BitSet(); static BitSet[] jhBit = new BitSet[M];...