MERCY Act Maintaining dignity and Eliminating unnecessary Restrictive Confinement of Youths Act of 2017 This bill amends the federal criminal code to prohibit juvenile solitary confinement, except as a temporary response to behavior that poses a serious and immediate risk of harm.