114_B. PFAST Inc.
When little Petya grew up and entered the university, he started to take part in АСМ contests. Later he realized that he doesn't like how the АСМ contests are organised: the team could only have three members (and he couldn't take all his friends to the competitions and distribute the tasks between the team members efficiently), so he decided to organize his own contests PFAST Inc. — Petr and Friends Are Solving Tasks Corporation. PFAST Inc. rules allow a team to have unlimited number of members.

To make this format of contests popular he organised his own tournament. To create the team he will prepare for the contest organised by the PFAST Inc. rules, he chose several volunteers (up to 16 people) and decided to compile a team from them. Petya understands perfectly that if a team has two people that don't get on well, then the team will perform poorly. Put together a team with as many players as possible given that all players should get on well with each other.

Input

The first line contains two integer numbers n (1 ≤ n ≤ 16) — the number of volunteers, and m (<image>) — the number of pairs that do not get on. Next n lines contain the volunteers' names (each name is a non-empty string consisting of no more than 10 uppercase and/or lowercase Latin letters). Next m lines contain two names — the names of the volunteers who do not get on. The names in pair are separated with a single space. Each pair of volunteers who do not get on occurs exactly once. The strings are case-sensitive. All n names are distinct.

Output

The first output line should contain the single number k — the number of people in the sought team. Next k lines should contain the names of the sought team's participants in the lexicographical order. If there are several variants to solve the problem, print any of them. Petya might not be a member of the sought team. 

Examples

Input

3 1
Petya
Vasya
Masha
Petya Vasya


Output

2
Masha
Petya


Input

3 0
Pasha
Lesha
Vanya


Output

3
Lesha
Pasha
Vanya
```python
'''input
7 12
Pasha
Lesha
Vanya
Taras
Nikita
Sergey
Andrey
Pasha Taras
Pasha Nikita
Pasha Andrey
Pasha Sergey
Lesha Taras
Lesha Nikita
Lesha Andrey
Lesha Sergey
Vanya Taras
Vanya Nikita
Vanya Andrey
Vanya Sergey
'''
from sys import stdin, stdout
from collections import deque
import sys
from copy import deepcopy
import math
import collections
from itertools import combinations


def check(temp):
	for i in range(len(temp)):
		for j in range(i + 1, len(temp)):
			if temp[i] in enemy:
				if temp[j] in enemy[temp[i]]:
					return False
			if temp[j] in enemy:
				if temp[i] in enemy[temp[j]]:
					return False
	# print(temp)
	return True


# main start
n, m = list(map(int, stdin.readline().split()))
name = dict()
back_name = dict()
arr = []
for i in range(n):
	string = stdin.readline().strip()
	name[string] = i
	back_name[i] = string

enemy = collections.defaultdict(dict)
for i in range(m):
	first, second = list(stdin.readline().split())
	enemy[name[first]][name[second]] = True
	enemy[name[second]][name[first]] = True

# print(enemy)
arr = [x for x in range(n)]
ans = []
num = 0
for i in range(1, n + 1):
	comb = combinations(arr, i)
	for i in comb:
		temp = list(i)
		# 	print(temp)
		if check(temp):
			# print(temp)
			if len(temp) > num:
				ans = temp
				num = len(temp)



print(len(ans))
ans2 = []
for i in ans:
	ans2.append(back_name[i])

ans2.sort()
for i in ans2:
	print(i)

```