#!/usr/bin/env python3

from glob import glob
import sys

dir1, dir2 = sys.argv[1:]

files1 = glob(dir1 + '/*')
files2 = glob(dir2 + '/*')

files1 = [f.split('/').pop() for f in files1]
files2 = [f.split('/').pop() for f in files2]

conflicts = [f for f in files1 if f in files2]

for c in conflicts:
	print(c)
