CF360D Levko and Sets

Description

Levko loves all sorts of sets very much. Levko has two arrays of integers $ a_{1},a_{2},...\ ,a_{n} $ and $ b_{1},b_{2},...\ ,b_{m} $ and a prime number $ p $ . Today he generates $ n $ sets. Let's describe the generation process for the $ i $ -th set: 1. First it has a single number $ 1 $ . 2. Let's take any element $ c $ from this set. For all $ j $ ( $ 1

Input Format

N/A

Output Format

N/A