; and (2) by adding at the end the following: (B) In any fiscal year in which the number of petitions filed for nonimmigrant status under section 101(a)(15)(H)(i)(b) during the first 5 business days of the petition filing period exceeds the numerical limitation for that fiscal year, the Secretary shall consider petitions received during those 5 business days in the following order: (i) Petitions for aliens who have earned a master’s or higher degree from an institution of higher education (as defined in section 101(a) of the Higher Education Act of 1965 ( 20 U.S.C. 1001(a) )) in the United States and who are subject to the numerical limitations under paragraph (1)(A). (ii) Petitions for aliens who have earned a doctoral degree from an institution of higher education outside the United States in a specialty related to the intended employment if such degree is equivalent to a doctoral degree awarded by an institution of higher education (as defined in section 101(a) of the Higher Education Act of 1965 ( 20 U.S.C. 1001(a) )) in the United States. (iii) Petitions for aliens who have earned a bachelor’s degree in a field listed on the STEM Designated Degree Program List published by the Department of Homeland Security on the Student and Exchange Visitor Program website from an institution of higher education (as defined in section 101(a) of the Higher Education Act of 1965 ( 20 U.S.C. 1001(a) )) in the United States. (iv) Other petitions. (C) The first sentence of subparagraph (A) shall not apply in any fiscal year in which the demand for nonimmigrant visas under section 101(a)(15)(H)(i)(b) exceeds the numerical limitation under paragraph (1)(A) during the first 5 business days of the petition filing period. . (c) Penalty (1) In general Section 214(g)(9) of the Immigration and Nationality Act, as added by subsection (a)(7), is amended by adding at the end the following: (D) (i) Subject to clause (ii), if 5 or more petitions for H–1B classification subject to the cap established under paragraph (1)(A) filed by an