#!bin/bash

# script should be run in the directory which contains both 
# 'dictionary.txt' & 'legendaryPokemon.zip'
for word in $(< dictionary.txt)
do 
	if yes | unzip -qq -P "$word" legendaryPokemon.zip
	then
    	echo "$word"
    	break
	fi
done