Python (2.6) ~ 269 characters.
Probably still room for improvement, hints welcome.
Handles specifications I think.
import sys;a=sys.stdin.readlines();b=a[0].split()
f=b[0];d=dict((x,{})for x in b);s=''
for x,y,z in map(str.split,a[1:-1]):d[x][y]=z
for g in a[-1]:
try:s+=f+' '+g;f=d[f][g];s+=' -> '+f+'\n'
except:s+='\n';break
print s+("REJECT","ACCEPT")[ord(f[0])<90 and g in d[f]]