Something is wrong here.  Host 2 only has App1, so is only in groups A, B, C; but the space-separated list includes X, Y, Z.