; (B) in subparagraph (B)— (i) by striking subparagraph (A) and inserting subparagraph (A) or (B) (as the case may be) ; and (ii) by redesignating such subparagraph as subparagraph (C); and (C) by inserting after subparagraph (A) the following new subparagraph: (B) Computation for territories The amount computed under this paragraph for a State not described in subparagraph (A) and for a month in a year (beginning with 2024) is equal to— (i) 1/12 of the product of— (I) the amount determined under subsection (e) for the State for 2023; and (II) 100 percent minus the highest possible Federal medical assistance percentage that may be applied to any of the 50 States for fiscal year 2022 under section 1905(b)(1); and (ii) increased for each year (beginning with 2023 up to and including the year involved) by the applicable growth factor specified in paragraph (4) for that year. ; and (3) in subsection (e)— (A) in paragraph (1)— (i) in subparagraph (A), by striking of such State; and and inserting of such State for years before 2022; ; (ii) in subparagraph (B)— (I) by inserting for periods before January 1, 2024 after (B) ; and (II) by striking the period at the end and inserting ; and ; and (iii) by adding at the end the following new subparagraph: (C) for the first 3 quarters of fiscal year 2024 and for each subsequent fiscal year, the amount otherwise applied under section 1108(f) for the State shall be increased by the amount specified in paragraph (4)(A) for such period or fiscal year. ; (B) in paragraph (2), by striking The Secretary and inserting For periods before January 2024, the Secretary ; (C) in paragraph (3)— (i) in the heading, by inserting before second quarter of fiscal year 2024 after Increased amount ; (ii) in subparagraph (A)— (I) in the matter before clause (i), by inserting or other fiscal period after for a year ; and (II) in clause (i), by inserting for such year or period after subparagraph (B) ; and (iii) in subparagraph (B)— (I) in clause (ii), by striking or at the end