use a queue to clone graph