A compound of formula wherein A is selected from the group A-G1 consisting of N, CH, C-F, C-CI, C-Br, C-CN, and C-CH 3; R 1 is selected from the group R 1 -G1 consisting of H and C 1-3 -alkyl optionally substituted with 1 to 3 F; R 2 is selected from the group R 2 -G1 consisting of saturated 6-12-membered bicyclic ring systems containing 1 to 3 N atoms as ring members and optionally 1 to 2 ring members selected from the group consisting of C=O, O, S, S=O, and SO 2, provided that the ring systems do not contain any heteroatom-heteroatom bonds between ring members, wherein said ring systems are attached to the heteroaromatic ring in formula via an N atom, and wherein said ring systems are optionally substituted with 1 to 6 F, optionally substituted with 1 substituent R 3, and optionally substituted with 1 or 2 CH 3 groups; X is selected from the group X-G1 consisting of 5-membered heteroaryls containing 1 to 3 N atoms, and 9-membered heteroaryls consisting of a 5-membered ring fused to a 6-membered ring and containing 1 to 3 N atoms, wherein said heteroaryls are attached to the carbonyl group in formula via a C atom of the 5-membered ring and to the CH 2 group in formula via a non-adjacent C or N atom of the 5-membered ring, and wherein said heteroaryls are optionally substituted with 1 substituent R 4; R 3 is selected from the group R 3 -G1 consisting of C 1-3 -alkyl, C 1-3 -alkylene-OH, C 1-3 -alkylene-O-CH 3, -CN, -NH 2, -OH, and -O-C 1-3 -alkyl; R 4 is selected from the group R 4 -G1 consisting of F, Cl, Br, C 1-3 -alkyl optionally substituted with 1 to 3 F, C 1-3 -alkylene-OH, C 1-3 -alkylene-O-CH 3, -CN, -NH 2, -OH, -O-C 1-3 -alkyl, and 5-membered heteroaryls containing 1 -NH-, -N<, -O-, or -S- ring member and optionally additionally 1 or 2 =N- ring members and being optionally substituted with 1 or 2 CH 3 groups; R' is selected from the group R'-G1 consisting of F, Cl, C 1-3 -alkyl optionally substituted with 1 to 3 F, C 3-4 -cycloalkyl, - CN, -O-C 1-3 -alkyl optionally substituted with 1 to 3 F, and -SO 2 -C 1-3 -alkyl; R" is at each occurrence independently selected from the group R"-G1 consisting of F, Cl, and CH 3; and n is an integer selected from the group n-G1 consisting of 0, 1, and 2; or a salt thereof. A is selected from the group A-G1 consisting of N, CH, C-F, C-CI, C-Br, C-CN, and C-CH 3; R 1 is selected from the group R 1 -G1 consisting of H and C 1-3 -alkyl optionally substituted with 1 to 3 F; R 2 is selected from the group R 2 -G1 consisting of saturated 6-12-membered bicyclic ring systems containing 1 to 3 N atoms as ring members and optionally 1 to 2 ring members selected from the group consisting of C=O, O, S, S=O, and SO 2, provided that the ring systems do not contain any heteroatom-heteroatom bonds between ring members, wherein said ring systems are attached to the heteroaromatic ring in formula via an N atom, and wherein said ring systems are optionally substituted with 1 to 6 F, optionally substituted with 1 substituent R 3, and optionally substituted with 1 or 2 CH 3 groups; saturated 6-12-membered bicyclic ring systems containing 1 to 3 N atoms as ring members and optionally 1 to 2 ring members selected from the group consisting of C=O, O, S, S=O, and SO 2, provided that the ring systems do not contain any heteroatom-heteroatom bonds between ring members, wherein said ring systems are attached to the heteroaromatic ring in formula via an N atom, and wherein said ring systems are optionally substituted with 1 to 6 F, optionally substituted with 1 substituent R 3, and optionally substituted with 1 or 2 CH 3 groups; X is selected from the group X-G1 consisting of 5-membered heteroaryls containing 1 to 3 N atoms, and 9-membered heteroaryls consisting of a 5-membered ring fused to a 6-membered ring and containing 1 to 3 N atoms, wherein said heteroaryls are attached to the carbonyl group in formula via a C atom of the 5-membered ring and to the CH 2 group in formula via a non-adjacent C or N atom of the 5-membered ring, and wherein said heteroaryls are optionally substituted with 1 substituent R 4; 5-membered heteroaryls containing 1 to 3 N atoms, and 9-membered heteroaryls consisting of a 5-membered ring fused to a 6-membered ring and containing 1 to 3 N atoms, wherein said heteroaryls are attached to the carbonyl group in formula via a C atom of the 5-membered ring and to the CH 2 group in formula via a non-adjacent C or N atom of the 5-membered ring, and wherein said heteroaryls are optionally substituted with 1 substituent R 4; R 3 is selected from the group R 3 -G1 consisting of C 1-3 -alkyl, C 1-3 -alkylene-OH, C 1-3 -alkylene-O-CH 3, -CN, -NH 2, -OH, and -O-C 1-3 -alkyl; R 4 is selected from the group R 4 -G1 consisting of F, Cl, Br, C 1-3 -alkyl optionally substituted with 1 to 3 F, C 1-3 -alkylene-OH, C 1-3 -alkylene-O-CH 3, -CN, -NH 2, -OH, -O-C 1-3 -alkyl, and 5-membered heteroaryls containing 1 -NH-, -N<, -O-, or -S- ring member and optionally additionally 1 or 2 =N- ring members and being optionally substituted with 1 or 2 CH 3 groups; R' is selected from the group R'-G1 consisting of F, Cl, C 1-3 -alkyl optionally substituted with 1 to 3 F, C 3-4 -cycloalkyl, - CN, -O-C 1-3 -alkyl optionally substituted with 1 to 3 F, and -SO 2 -C 1-3 -alkyl; R" is at each occurrence independently selected from the group R"-G1 consisting of F, Cl, and CH 3; and n is an integer selected from the group n-G1 consisting of 0, 1, and 2; or a salt thereof.