To find the code for 'we ', we need to have any of the following :
(i) 'We are friends' should have only 'We' common with another statement, as in II;
(ii) 'We are friends' should have only 'are' and 'friends' common with another single or two statements, as in I and III.
Thus, we need Either II only or I and III only.