Conversion of NFA to RE