for rdfg in ` awk '{print $1}' all_rdfgs`
do
fiveh=N
sixh=N
if grep "3286 ${rdfg}" 5h_sorted
then
	fiveh=Y
fi
if grep "3286 ${rdfg} " 6h_sorted
then
	sixh=Y
fi

if [ "${sixh}" = "Y" -a "${fiveh}" = "Y" ]
then
	print ${rdfg} ALL >> rdfg_assigns
elif [ "${fiveh}" = "Y" -a "${sixh}" = "N" ]
then
	print ${rdfg} 5H/12H >> rdfg_assigns
elif [ "${sixh}" = "Y" -a "${fiveh}" = "N" ]
then
	print ${rdfg} 6H/11H >> rdfg_assigns
else
	print ${rdfg} ? >> rdfg_assigns
fi
done
