Claiming Exemption on Section 54 and Section 54F on two residential properties

My relative had 2 residential houses(H1,H2) and 2 residential sites(S1,S2) in her name. She indents to sell H2, S1,S2 and invest in 2 residential houses (N1,N2). For claiming exemption under section 54F, she should only own one house, hence she is selling H2 first and then only S1,S2.She wants to claim capital gains exemption.

  1. from sale of H2 by investing in N1 under section 54
  2. entire proceeds of sale of S1,S2 by investing in N2 under Section 54F

Is there any issue is this transactions for capital gains ?
Is there a sequence for investing like N1 should be before N2 ? I ask this because there is a clause which says if I buy another house after claiming exemption for under section 54F, then that exemption becomes invalid. So Ideally I should buy N1 ( exemption coming from Section 54) first and then N2 (exemption from section 54F).

please clarify.

If you buy N1 first then you will be having more than one residential house( N1 & H1) on the date of transfer of S1 AND S2.

As per first provision of Sec 54F(1) , assessee shall not own more than one residential house on the date of transfer.