Generate sequence and condition