; and (B) in the case of a child placed in a qualified residential treatment program (as defined in paragraph (4)), the requirements specified in paragraph (3) and section 475A(c) are met. (2) Specified settings for placement The settings for placement specified in this paragraph are the following: (A) A qualified residential treatment program (as defined in paragraph (4)). (B) A setting specializing in providing prenatal, post-partum, or parenting supports for youth. (C) In the case of a child who has attained 18 years of age, a supervised setting in which the child is living independently. (3) Assessment to determine appropriateness of placement in a qualified residential treatment program (A) Deadline for assessment In the case of a child who is placed in a qualified residential treatment program, if the assessment required under section 475A(c)(1) is not completed within 30 days after the placement is made, no Federal payment shall be made to the State under section 474(a)(1) for any amounts expended for foster care maintenance payments on behalf of the child during the placement. (B) Deadline for transition out of placement If the assessment required under section 475A(c)(1) determines that the placement of a child in a qualified residential treatment program is not appropriate, a court disapproves such a placement under section 475A(c)(2), or a child who has been in an approved placement in a qualified residential treatment program is going to return home or be placed with a fit and willing relative, a legal guardian, or an adoptive parent, or in a foster family home, Federal payments shall be made to the State under section 474(a)(1) for amounts expended for foster care maintenance payments on behalf of the child while the child remains in the qualified residential treatment program only during the period necessary for the child to transition home or to such a placement. In no event shall a State receive Federal payments under section 474(a)(1) for amounts expended for foster care maintenance payments on