Invitae interview question

Write an algorithm that converts sequences to CIGAR.