You can try following algorithm:
In reply to Re: Finding intersection of many sequences by grizzley in thread Finding intersection of many sequences by emos