for _ in range(int(input().strip())):
    n = int(input().strip())
    a = list(map(int,input().strip().split()))

    e,o = [],[]
    for i in range(len(a)):
        if a[i]%2 == 0:
            e.append(i)
        else:
            o.append(i)

    ei = []
    oi = []
    for i in range(0,(len(e)//2)*2,2):
        ei.append([e[i],e[i+1]])

    for i in range(0,(len(o)//2)*2,2):
        oi.append([o[i],o[i+1]])

    if len(e)%2 == 0:
        if len(e) > 0:
            ei.pop()
        elif len(o) > 0:
            oi.pop()

    res = [*ei,*oi]
    for i in res:
        print(i[0]+1,i[1]+1)


for _ in range(int(input().strip())):
    n = int(input().strip())
    a = list(map(int,input().strip().split()))

    e,o = [],[]
    # for i in a:
    #     if i%2 == 0:
    #         e.append((i,a.index(i)))
    #     else:
    #         o.append((i,a.index(i)))

    for i in range(len(a)):
        if a[i]%2 == 0:
            e.append([a[i],i])
        else:
            o.append([a[i],i])

    ei = []
    oi = []
    for i in range(0,(len(e)//2)*2,2):
        ei.append([e[i][1],e[i+1][1]])

    for i in range(0,(len(o)//2)*2,2):
        oi.append([o[i][1],o[i+1][1]])

    ei1,oi1 = [],[]
    if len(e)%2 == 0 and len(o)%2 == 0:
        ei1 = ei[0:len(ei)-1]
        oi1 = oi
    else:
        ei1,oi1 = ei,oi

    res = []
    for i in ei1:
        res.append(i)
    for i in oi1:
        res.append(i)
    res.sort(key=lambda x: x[0])
    for i in res:
        print(i[0]+1,i[1]+1)


for _ in range(int(input().strip())):
    n = int(input().strip())
    a = list(map(int,input().strip().split()))

    e,o = [],[]
    for i in range(len(a)):
        if a[i]%2 == 0:
            e.append(i)
        else:
            o.append(i)

    ei = []
    oi = []
    for i in range(0,(len(e)//2)*2,2):
        ei.append([e[i],e[i+1]])

    for i in range(0,(len(o)//2)*2,2):
        oi.append([o[i],o[i+1]])

    if len(e)%2 == 0:
        ei.pop()

    res = [*ei,*oi]
    for i in res:
        print(i[0]+1,i[1]+1)


for _ in range(int(input().strip())):
    n = int(input().strip())
    a = list(map(int,input().strip().split()))

    e,o = [],[]
    for i in a:
        if i%2 == 0:
            e.append((i,a.index(i)))
        else:
            o.append((i,a.index(i)))

    ei = []
    oi = []
    for i in range(0,(len(e)//2)*2,2):
        ei.append((e[i][1],e[i+1][1]))

    for i in range(0,(len(o)//2)*2,2):
        oi.append((o[i][1],o[i+1][1]))

    ei1,oi1 = [],[]
    if len(e)%2 == 0 and len(o)%2 == 0:
        ei1 = ei[0:len(ei)-1]
        oi1 = oi
    else:
        ei1,oi1 = ei,oi

    for i in ei1:
        print(i[0],'',i[1])
    for i in oi1:
        print(i[0],'',i[1])


for _ in range(int(input().strip())):
    n = int(input().strip())
    a = list(map(int,input().strip().split()))

    e,o = [],[]
    for i in range(len(a)):
        if a[i]%2 == 0:
            e.append(i)
        else:
            o.append(i)

    ei = []
    oi = []
    for i in range(0,(len(e)//2)*2,2):
        ei.append([e[i],e[i+1]])

    for i in range(0,(len(o)//2)*2,2):
        oi.append([o[i],o[i+1]])

    if len(e)%2 == 0:
        ei.pop()

    res = [*ei,*oi]
    for i in [res]:
        print(i[0]+1,i[1]+1)


for _ in range(int(input().strip())):
    n = int(input().strip())
    a = list(map(int,input().strip().split()))

    e,o = [],[]
    for i in range(len(a)):
        if a[i]%2 == 0:
            e.append(i)
        else:
            o.append(i)

    ei = []
    oi = []
    for i in range(0,(len(e)//2)*2,2):
        ei.append([e[i],e[i+1]])

    for i in range(0,(len(o)//2)*2,2):
        oi.append([o[i],o[i+1]])

    if len(e)%2 == 0:
        ei.pop()

    for i in [*ei,*oi]:
        print(i[0]+1,i[1]+1)


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	even = list()
	odd = list()
	for i in range(len(a)):
		if a[i]%2==0:
			even.append(i+1)
		else :
			odd.append(i+1)
	if len(even)%2==0:
		for i in range(0,len(even),2):
			print(even[i],even[i+1])
		for i in range(0,len(odd)-2,2):
			print(odd[i],odd[i+1])
	else :
		for i in range(0,len(even)-1,2):
			print(even[i],even[i+1])
		for i in range(0, len(odd)-1, 2):
			print(odd[i],odd[i+1])


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	even = list()
	odd = list()
	for i in a:
		if i%2==0:
			even.append(i)
		else :
			odd.append(i)
	if len(even)%2==0:
		for i in range(0,len(even),2):
			print("{0} {1}".format(even[i], even[i+1]))
		for i in range(0,len(odd)-2,2):
			print("{0} {1}".format(odd[i], odd[i+1]))
	else :
		print(len(even))
		for i in range(0,len(even)-1,2):

			print("{0} {1}".format(even[i], even[i+1]))
		for i in range(0, len(odd)-1, 2):
			print("{0} {1}".format(odd[i],odd[i+1]))


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	even = list()
	odd = list()
	for i in a:
		if i%2==0:
			even.append(i)
		else :
			odd.append(i)
	if len(even)%2==0:
		for i in range(0,len(even),2):
			print("{0} {1}".format(even[i], even[i+1]))
		for i in range(0,len(odd)-2,2):
			print("{0} {1}".format(odd[i], odd[i+1]))
	else :
		# print(len(even))
		for i in range(0,len(even)-1,2):
			print("{0} {1}".format(even[i], even[i+1]))
		for i in range(0, len(odd)-1, 2):
			print("{0} {1}".format(odd[i],odd[i+1]))


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	even = list()
	odd = list()
	for i in range(len(a)):
		if a[i]%2==0:
			even.append(list([a[i],i+1]))
		else :
			odd.append(list([a[i],i+1]))
	# print(even, odd)
	if len(even)%2==0:
		for i in range(0,len(even),2):
			print(even[i][1],even[i+1][1])
		for i in range(0,len(odd)-2,2):
			print(odd[i][1],odd[i+1][1])
	else :
		# print(len(even))
		for i in range(0,len(even)-1,2):
			print(even[i][1],even[i+1][1])
		for i in range(0, len(odd)-1, 2):
			print(odd[i][1],odd[i+1][1])


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	even = list()
	odd = list()
	for i in range(len(a)):
		if a[i]%2==0:
			even.append(i+1)
		else :
			odd.append(i+1)
	if len(even)%2==0:
		for i in range(0,min(len(even), 2*n-2),2):
			print(even[i],even[i+1])
		for i in range(0,len(odd)-2,2):
			print(odd[i],odd[i+1])
	else :
		for i in range(0,len(even)-1,2):
			print(even[i],even[i+1])
		for i in range(0, len(odd)-1, 2):
			print(odd[i],odd[i+1])


t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	even = list()
	odd = list()
	for i in range(len(a)):
		if a[i]%2==0:
			even.append(list([a[i],i+1]))
		else :
			odd.append(list([a[i],i+1]))
	# print(even, odd)
	if len(even)%2==0:
		for i in range(0,len(even),2):
			print(even[i][1],even[i+1][1])
		for i in range(0,len(odd)-2,2):
			print(odd[i][1],odd[i+1][1])
	else :
		for i in range(0,len(even)-1,2):
			print(even[i][1],even[i+1][1])
		for i in range(0, len(odd)-1, 2):
			print(odd[i][1],odd[i+1][1])


for _ in range(int(input())):
    n=int(input())
    a=list(map(int,input().split()))
    beven,bodd=[],[]
    codd,ceven=0,0
    coun=0
    f=0
    for i in range(2*n):
        for j in range(i+1,2*n):
            if a[i]%2==0 and a[i]!=0:
                if a[j]%2==0 and a[j]!=0:
                    print(i,j)
                    a[j],a[i]=0,0
                    coun += 1
                    if coun == n-1:
                        f = 1
                        break
                    break
            elif a[i]%2==1 and a[i]!=0:
                if a[j]%2==1 and a[j]!=0:
                    print(i,j)
                    coun += 1
                    a[i],a[j]=0,0
                    if coun == n-1:
                        f = 1
                        break
                    break
        if f==1:
            break


for _ in range(int(input())):
    n=int(input())
    a=list(map(int,input().split()))
    beven,bodd=[],[]
    codd,ceven=0,0
    coun=0
    f=0
    for i in range(2*n):
        for j in range(i+1,2*n):
            if a[i]%2==0:
                if a[j]%2==0 and a[j]!=0:
                    print(i,j)
                    a[j],a[i]=0,0
                    coun += 1
                    if coun == n-1:
                        f = 1
                        break
                    break
            else:
                if a[j]%2==1 and a[j]!=0:
                    print(i,j)
                    coun += 1
                    if coun == n-1:
                        f = 1
                        break
                    break
        if f==1:
            break


for _ in range(int(input())):
    n=int(input())
    a=list(map(int,input().split()))
    coun=0
    f=0
    even=[]
    odd=[]
    for i in range(2*n):
        if a[i]%2==0:
            even.append(i+1)
        else:
            odd.append(i+1)
    f=0
    coun=0
    if len(even)%2==0:
        l=len(even)
    else:
        l=len(even)-1
    for i in range(0,l-1,2):
        print(even[i],even[i+1])
        coun+=1
        if coun==n-1:
            f=1
            break
    if f==0:
        for i in range(0,len(odd)-1,2):
            print(odd[i],odd[i+1])
            coun+=1
            if coun==n-1:
                break


for _ in range(int(input())):
    n=int(input())
    a=list(map(int,input().split()))
    coun=0
    f=0
    for i in range(2*n):
        for j in range(i+1,2*n):
            if a[i]%2==0 and a[i]!=0:
                if a[j]%2==0 and a[j]!=0:
                    print(i+1,j+1)
                    a[j],a[i]=0,0
                    coun += 1
                    if coun == n-1:
                        f = 1
                        break
                    break
            elif a[i]%2==1 and a[i]!=0:
                if a[j]%2==1 and a[j]!=0:
                    print(i+1,j+1)
                    coun += 1
                    a[i],a[j]=0,0
                    if coun == n-1:
                        f = 1
                        break
                    break
        if f==1:
            break


#! /usr/bin/python3
for _ in range(int(input())):
    n = int(input())
    l = list(map(int , input().split()))
    if n==1:
        print(1,2)
    else:
        o,e = 0,0
        l_o = []
        l_e = []
        for i in range(2*n):
            if l[i]%2==0:
                l_e.append(i)
                e+=1
            else:
                l_o.append(i)
                o+=1
        c=0
        if o%2!=0:
            l_e.pop(0)
            l_o.pop(0)

        for i in range(min(len(l_o),len(l_e))//2):
            print(l_o.pop(0)+1 , l_o.pop(0)+1)
            print(l_e.pop(0)+1 , l_e.pop(0)+1)
            c+=2

        if len(l_e)==0:
            while len(l_o)>=2 and c!=n-1:
                print(l_o.pop(0)+1 , l_o.pop(0)+1)
                c+=1
        else:
             while len(l_e)>=2 and c!=n-1:
                print(l_e.pop(0)+1 , l_e.pop(0)+1)
                c+=1


#! /usr/bin/python3
#! /usr/bin/python3
for _ in range(int(input())):
    n = int(input())
    l = list(map(int , input().split()))
    o,e = 0,0
    l_o = []
    l_e = []
    for i in range(2*n):
        if l[i]%2==0:
            l_e.append(i)
            e+=1
        else:
            l_o.append(i)
            o+=1
    c=0
    if len(l_e)>=2 and len(l_e)%2==0:
        l_e.pop(0)
        l_e.pop(0)
    elif len(l_o)>=2 and  len(l_o)%2==0:
        l_o.pop(0)
        l_o.pop(0)
    else:
        l_o.pop(0)
        l_e.pop(0)

    for i in range(1,len(l_e) , 2):
        print(l_e[i]+1 , l_e[i-1]+1)
    for i in range(1,len(l_o) , 2):
        print(l_o[i]+1 , l_o[i-1]+1)


#! /usr/bin/python3
#! /usr/bin/python3
for _ in range(int(input())):
    n = int(input())
    l = list(map(int , input().split()))
    o,e = 0,0
    l_o = []
    l_e = []
    for i in range(2*n):
        if l[i]%2==0:
            l_e.append(i)
            e+=1
        else:
            l_o.append(i)
            o+=1
    c=0
    if len(l_e)>=2 and len(l_e)%2==0:
        l_e.pop(0)
        l_e.pop(0)
    elif len(l_o)>=2 and  len(l_o)%2==0:
        l_o.pop(0)
        l_o.pop(0)
    else:
        l_o.pop(0)
        l_e.pop(0)

    for i in range(1,len(l_e) , 2):
        print(l_e[i] , l_e[i-1])
    for i in range(1,len(l_o) , 2):
        print(l_o[i] , l_o[i-1])


#! /usr/bin/python3
for _ in range(int(input())):
    n = int(input())
    l = list(map(int , input().split()))
    if n==1:
        print(1,2)
    else:
        o,e = 0,0
        l_o = []
        l_e = []
        for i in range(2*n):
            if l[i]%2==0:
                l_e.append(i)
                e+=1
            else:
                l_o.append(i)
                o+=1
        if o%2!=0:
            l_e.pop(0)
            l_o.pop(0)

        for i in range(min(len(l_o),len(l_e))//2):
            print(l_o.pop(0)+1 , l_o.pop(0)+1)
            print(l_e.pop(0)+1 , l_e.pop(0)+1)

        if len(l_e)==0:
            while len(l_o)>2:
                print(l_o.pop(0)+1 , l_o.pop(0)+1)
        else:
             while len(l_e)>2:
                print(l_e.pop(0)+1 , l_e.pop(0)+1)


t=int(input())
for i in range(t):
  n=int(input())
  a=input().split(' ')
  a=[int(j) for j in a]
  even=[]
  odd=[]
  for num in range(len(a)):
    if a[num]%2==0:
      even.append(num)
    else:
      odd.append(num)
  if len(odd)%2!=0: del odd[0]
  if len(even)%2!=0: del even[0]
  for k in range(0,len(odd)-1,2):
    print(odd[k]+1, odd[k+1]+1)
  for k in range(0,len(even)-1,2):
    print(even[k]+1,even[k+1]+1 )


t=int(input())
for i in range(t):
  n=int(input())
  a=input().split(' ')
  a=[int(j) for j in a]
  even=[]
  odd=[]
  for num in range(len(a)):
    if a[num]%2==0:
      even.append(num)
    else:
      odd.append(num)
  if len(odd)%2!=0: del odd[0]
  if len(even)%2!=0: del even[0]
  lis=odd+even
  if (len(lis))/2 !=n-1:
    lis=lis[:len(lis)-2]

  for out in range(0,len(lis)-1,2):
    print(lis[out]+1, lis[out+1]+1)


t=int(input())
for i in range(t):
  n=int(input())
  a=input().split(' ')
  a=[int(j) for j in a]
  even=[]
  odd=[]
  for num in a:
    if num==1:
      pass
    elif num%2==0:
      even.append(num)
    else:
      odd.append(num)
  if len(odd)%2!=0: del odd[0]
  if len(even)%2!=0: del even[0]
  for k in range(len(odd)-1):
    print(odd[k], odd[k+1])
  for k in range(len(even)-1):
    print(even[k],even[k+1] )


import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int[] a = new int[100001];
        for(int i: a) i = 0;

        for(int i = 0; i < n; i++) {
            int c = scan.nextInt();
            a[c] = scan.nextInt();
        }

        int i = 1;
        int j = 2;
        boolean happy = false;
        while (i < a.length && j < a.length && !happy) {
            while (a[i] == 0 && i < a.length) i++;
            j = i + 1;
            while (a[j] == 0 && j < a.length) j++;
            if (a[i] > a[j]) happy = true;
            i = ++j;
        }

        if (happy) {
            System.out.println("Happy Alex");
        } else System.out.println("Poor Alex");
    }
}


import java.util.Scanner;

public final class Notebook {
    public int cost;
    public int qual;
    public Notebook() {
        cost = 0;
        qual = 0;
    }
}

public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        Notebook[] a;
        a = new Notebook[n];

        for(int i = 0; i < n; i++) {
            a[i] = new Notebook();
            a[i].cost = scan.nextInt();
            a[i].qual = scan.nextInt();
        }
        // bubble sort
        for(int i = 0; i < n; i++) {
            for(int j = 0; j < n - 1; j++) {
                if(a[j].cost > a[j + 1].cost) {
                    Notebook sw = new Notebook();
                    sw.cost = a[j].cost;
                    sw.qual = a[j].qual;
                    a[j].cost = a[j + 1].cost;
                    a[j].qual = a[j + 1].qual;
                    a[j + 1].cost = sw.cost;
                    a[j + 1].qual = sw.qual;
                }
            }
        }
        boolean happy = false;
        for (int i = 0; (i < n - 1) && !happy; i++)
            if (a[i + 1].qual < a[i].qual) {
                happy = true;
            }
        if (happy) {
            System.out.println("Happy Alex");
        } else System.out.println("Poor Alex");
    }
}


import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        Notebook[] a;
        a = new Notebook[n];

        for(int i = 0; i < n; i++) {
            a[i] = new Notebook();
            a[i].cost = scan.nextInt();
            a[i].qual = scan.nextInt();
        }
        // bubble sort
        for(int i = 0; i < n; i++) {
            for(int j = 0; j < n - 1; j++) {
                if(a[j].cost > a[j + 1].cost) {
                    Notebook sw = new Notebook();
                    sw.cost = a[j].cost;
                    sw.qual = a[j].qual;
                    a[j].cost = a[j + 1].cost;
                    a[j].qual = a[j + 1].qual;
                    a[j + 1].cost = sw.cost;
                    a[j + 1].qual = sw.qual;
                }
            }
        }
        boolean happy = false;
        for (int i = 0; (i < n - 1) && !happy; i++)
            if (a[i + 1].qual < a[i].qual) {
                happy = true;
            }
        if (happy) {
            System.out.println("Happy Alex");
        } else System.out.println("Poor Alex");
    }
}

class Notebook {
    public int cost;
    public int qual;
    public Notebook() {
        cost = 0;
        qual = 0;
    }
}


import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int[] a = new int[100001];

        for(int i = 0; i < n; i++) {
            int c = scan.nextInt();
            a[c] = scan.nextInt();
        }

        if (n == 1) {
            System.out.println("Poor Alex");
            return;
        }

        int i = 1;
        while (a[i] == 0) i++;
        int j = i + 1;
        while (a[j] == 0) j++;
        boolean happy = false;
        while (j < a.length && !happy) {
            if (a[i] > a[j]) happy = true;
            else {
                i = j;
                j++;
                while (j < a.length) {
                    if (a[j] == 0) j++;
                    else break;
                }
            }
        }
        if (happy) {
            System.out.println("Happy Alex");
        } else System.out.println("Poor Alex");
    }
}


import java.util.*;
import java.io.*;

public class PA {

    /*

        Tyger! Tyger! burning bright
        In the forests of the night,
        What immortal hand or eye
        Could frame thy fearful symmetry?

        In what distant deeps or skies
        Burnt the fire of thine eyes?
        On what wings dare he aspire?
        What the hand, dare sieze the fire?

        And what shoulder, & what art,
        Could twist the sinews of thy heart?
        And when thy heart began to beat,
        What dread hand? & what dread feet?

        What the hammer? what the chain?
        In what furnace was thy brain?
        What the anvil? what dread grasp
        Dare its deadly terrors clasp?

        When the stars threw down their spears,
        And water’d heaven with their tears,
        Did he smile his work to see?
        Did he who made the Lamb make thee?

        Tyger! Tyger! burning bright
        In the forests of the night,
        What immortal hand or eye
        Dare frame thy fearful symmetry?

    */
    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        int n = Integer.parseInt(br.readLine());

        int f[] = new int[100001];

        for(int i = 0 ; i < n ; i++)
        {
            StringTokenizer st1 = new StringTokenizer(br.readLine());

            f[Integer.parseInt(st1.nextToken())] = Integer.parseInt(st1.nextToken());
        }
        int max = 0;
        for(int i = 0 ; i < f.length ; i++)
        {
            if(f[i] != 0)
            {
                if(f[i] > max)
                    max = f[i];
                else
                {
                    System.out.println("Happy Alex");
                    return;
                }
            }
        }

        System.out.println("Poor Alex");

    }

}


import java.util.*;
public class lll {

	public static void main(String [] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int max = 0 , maxq = 0 , maxi = 0;
		int tmp = 0;
		int arr[][] = new int [n][2];
		for(int i = 0 ; i < n ; i++)
		{
			for(int j = 0 ; j < 2 ; j++)
				arr[i][j] = sc.nextInt();
			if(arr[i][1] > max)
				max = arr[i][1];
			if(arr[i][0] > maxq)
			{
				maxq = arr[i][0];
				maxi = i;
			}
		}

		if(arr[maxi][1] < max)
			System.out.println("Happy Alex");
		else
			System.out.println("Poor Alex");

	}
}


import java.util.*;
public class lll {

	public static void main(String [] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int cnt = 0 ;
		int arr[][] = new int [n][2];
		for(int i = 0 ; i < n ; i++)
		{
			for(int j = 0 ; j < 2 ; j++)
				arr[i][j] = sc.nextInt();

			if(arr[i][0] > arr[i][1])
				cnt++;
		}

		if(cnt < n)
			System.out.println("Happy Alex");
		else
			System.out.println("Poor Alex");

	}
}


import java.util.*;
public class lll {

	public static void main(String [] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int max = 0 , maxq = 0 , maxi = 0;
		int tmp = 0;
		int arr[][] = new int [n][2];
		for(int i = 0 ; i < n ; i++)
		{
			for(int j = 0 ; j < 2 ; j++)
				arr[i][j] = sc.nextInt();
			if(arr[i][1] > max)
				max = arr[i][1];
			if(arr[i][0] > maxq)
			{
				maxq = arr[i][0];
				maxi = i;
			}
		}

		if(arr[maxi][1] <= max)
			System.out.println("Happy Alex");
		else
			System.out.println("Poor Alex");

	}
}


import java.util.*;
public class lll {

	public static void main(String [] args)
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int max = 0;
		int tmp = 0;
		int arr[][] = new int [n][2];
		for(int i = 0 ; i < n ; i++)
		{
			for(int j = 0 ; j < 2 ; j++)
				arr[i][j] = sc.nextInt();
			if(arr[i][1] > max)
				max = arr[i][1];
		}
		for(int i = 1 ; i < n ; i++)
		{
			for(int j = i - 1 ; j >= 0 ; j--)
			{
				if(arr[j][0] > arr[j+1][0])
				{
					tmp = arr[j][0];
					arr[j][0] = arr[j+1][0];
					arr[j+1][0] = tmp;

					tmp = arr[j][1];
					arr[j][1] = arr[j+1][1];
					arr[j+1][1] = tmp;

				}

			}
		}

		if(arr[n -1][1] < max)
			System.out.println("Happy Alex");
		else
			System.out.println("Poor Alex");

	}
}


import java.util.*;

public class JavaApplication10 {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n =scan.nextInt(),minPrice = Integer.MAX_VALUE,indx=0,minQal=Integer.MAX_VALUE;
        int arr[][] = new int [n][2];
        for(int i=0;i<n;i++){
            arr[i][0] = scan.nextInt();
            arr[i][1] = scan.nextInt();
            if(minPrice > arr[i][0]){
                minPrice = arr[i][0];
                indx = i;
            }
            minQal = Math.min(minQal, arr[i][1]);
        }
        System.out.println(arr[indx][1] == minQal? "Poor Alex":"Happy Alex");
    }
}


import java.util.*;

public class JavaApplication10 {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n =scan.nextInt(),maxPrice = 0,indx=0,maxQal=0;
        int arr[][] = new int [n][2];
        for(int i=0;i<n;i++){
            arr[i][0] = scan.nextInt();
            arr[i][1] = scan.nextInt();
            if(maxPrice < arr[i][0]){
                maxPrice = arr[i][0];
                indx = i;
            }
            maxQal = Math.max(maxQal, arr[i][1]);
        }
        System.out.println(arr[indx][1] == maxQal? "Poor Alex":"Happy Alex");
    }
}


import java.util.*;

public class JavaApplication10 {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n =scan.nextInt();
        TreeMap<Integer,Integer>map = new TreeMap<>();
        for(int i=0;i<n;i++){
            int a = scan.nextInt();
            int b = scan.nextInt();
            map.put(a,b);
        }
        String result = "Poor Alex";
        int min = Integer.MAX_VALUE;
        for(Map.Entry mm : map.entrySet()){
            if(min != Integer.MAX_VALUE && (int)mm.getValue() < min){
                result = "Happy Alex";
                break;
            }
            min = Math.min(min, (int)mm.getValue());
        }
        System.out.println(result);
    }
}


public class JavaApplication10 {

    static class Labtop implements Comparable<Labtop> {

        int price;
        int quality;

        public Labtop(int p, int q) {
            price = p;
            quality = q;
        }

        @Override
        public int compareTo(Labtop o) {
            if (price < o.price) {
                return -1;
            }
            return 1;
        }

    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        ArrayList<Labtop> ll = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            int a = scan.nextInt();
            int b = scan.nextInt();
            Labtop t = new Labtop(a, b);
            ll.add(t);
        }
        Collections.sort(ll);
        String result = "Poor Alex";
        int min = Integer.MAX_VALUE;
        for(int i= n-1; i>=0;i--){
            if(min < ll.get(i).quality){
                result = "Happy Alex";
                break;
            }
           min = Math.min(min,ll.get(i).quality);
        }
        System.out.println(result);
    }
}


import java.util.*;

public class JavaApplication10 {

    static class Labtop implements Comparable<Labtop> {

        int price;
        int quality;

        public Labtop(int p, int q) {
            price = p;
            quality = q;
        }

        @Override
        public int compareTo(Labtop o) {
            if (price < o.price) {
                return -1;
            }
            return 1;
        }

    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        ArrayList<Labtop> ll = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            int a = scan.nextInt();
            int b = scan.nextInt();
            Labtop t = new Labtop(a, b);
            ll.add(t);
        }
        Collections.sort(ll);
        String result = "Poor Alex";

        for(int i=0;i<ll.size();i++){
            for(int j=0;j<i;j++){
                if(ll.get(j).quality > ll.get(i).quality){
                    result  = "Happy Alex";
                    break;
                }
            }
        }
        System.out.println(result);
    }
}


import java.util.*;

public class JavaApplication10 {

    static class Labtop implements Comparable<Labtop> {

        int price;
        int quality;

        public Labtop(int p, int q) {
            price = p;
            quality = q;
        }

        @Override
        public int compareTo(Labtop o) {
            if (price < o.price) {
                return -1;
            }
            return 1;
        }

    }

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        ArrayList<Labtop> ll = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            int a = scan.nextInt();
            int b = scan.nextInt();
            Labtop t = new Labtop(a, b);
            ll.add(t);
        }
        Collections.sort(ll);
        String result = "Poor Alex";
        int min = Integer.MAX_VALUE;
        for(int i= n-1; i>=0;i--){
            if(min < ll.get(i).quality){
                result = "Happy Alex";
                break;
            }
           min = Math.min(min,ll.get(i).quality);
        }
        System.out.println(result);
    }
}


//456A : LAPTOPS

/*
 * Solution:
 */

/*
 * Prerequisite:
 * 	-
 */
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.StringTokenizer;

//Your code goes here
public class Main {

	static class ProblemSolver{
		public void solveTheProblem(InputReader in,PrintWriter out){
			int n=in.nextInt();
			ArrayList<Pair> pairs=new ArrayList<Pair>();
			while(n-->0){
				int price=in.nextInt();
				int quality=in.nextInt();
				pairs.add(new Pair(price, quality));
			}
			Collections.sort(pairs);

			for(int i=1;i<pairs.size();++i){
				if(pairs.get(i-1).quality<pairs.get(i).quality){
					System.out.println("Happy Alex");
					return;
				}
			}
			System.out.println("Poor Alex");
		}

		class Pair implements Comparable<Pair>,Comparator<Pair>{
			int price;
			int quality;

			public Pair(int price,int quality) {
				this.price=price;
				this.quality=quality;
			}

			public int compareTo(Pair o) {
				return Integer.compare(o.price,this.price);
			}
			public int compare(Pair o1, Pair o2) {
				return (o1.price<o2.price)?1:0;
			}

		}
	}

	//Default template for all the codes
	static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream),32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }

	//Main method for all the codes
	public static void main(String[] args) {
		InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
		ProblemSolver problemSolver = new ProblemSolver();
		problemSolver.solveTheProblem(in, out);
		out.close();
	}

}


//456A : LAPTOPS

/*
 * Solution:
 */

/*
 * Prerequisite:
 * 	-
 */
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.StringTokenizer;

//Your code goes here
public class Main {

	static class ProblemSolver{
		public void solveTheProblem(InputReader in,PrintWriter out){
			int n=in.nextInt();
			ArrayList<Pair> pairs=new ArrayList<Pair>();
			while(n-->0){
				int price=in.nextInt();
				int quality=in.nextInt();
				pairs.add(new Pair(price, quality));
			}
			Collections.sort(pairs);
			for(int i=0;i<pairs.size()-1;++i){
				int quality=pairs.get(i).quality;
				for(int j=i+1;j<pairs.size()-1;++j){
					if(pairs.get(j).quality>quality){
						System.out.println("Happy Alex");
						return;
					}
				}
			}
			System.out.println("Poor Alex");
		}

		class Pair implements Comparable<Pair>,Comparator<Pair>{
			int price;
			int quality;

			public Pair(int price,int quality) {
				this.price=price;
				this.quality=quality;
			}

			public int compareTo(Pair o) {
				return Integer.compare(o.price,this.price);
			}
			public int compare(Pair o1, Pair o2) {
				return (o1.price<o2.price)?1:0;
			}

		}
	}

	//Default template for all the codes
	static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream),32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }

	//Main method for all the codes
	public static void main(String[] args) {
		InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
		ProblemSolver problemSolver = new ProblemSolver();
		problemSolver.solveTheProblem(in, out);
		out.close();
	}

}


//456A : LAPTOPS

/*
 * Solution:
 */

/*
 * Prerequisite:
 * 	-
 */
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.StringTokenizer;

//Your code goes here
public class Main {

	static class ProblemSolver{
		public void solveTheProblem(InputReader in,PrintWriter out){
			int n=in.nextInt();
			ArrayList<Pair> list=new ArrayList<Pair>();
			while(n-->0){
				int cost=in.nextInt();
				int quality=in.nextInt();
				list.add(new Pair(cost, quality));
			}
			Collections.sort(list);
			int lim=list.size();
			out:
			for(int i=0;i<lim-1;++i){
				for(int j=i+1;j<lim;++j){
					if(list.get(i).quality>list.get(j).quality){
						System.out.println("Happy Alex");
						continue out;
					}
				}
				System.out.println("Poor Alex");
			}
		}

		class Pair implements Comparable<Pair>, Comparator<Pair>{
			int cost;
			int quality;
			public Pair(int cost,int quality) {
				this.cost=cost;
				this.quality=quality;
			}
			public int compare(Pair o1, Pair o2) {
				return (o1.cost<o2.cost)?1:0;
			}
			public int compareTo(Pair o) {
				return Integer.compare(this.cost, o.cost);
			}

		}
	}

	//Default template for all the codes
	static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream),32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }

	//Main method for all the codes
	public static void main(String[] args) {
		InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
		ProblemSolver problemSolver = new ProblemSolver();
		problemSolver.solveTheProblem(in, out);
		out.close();
	}

}


//456A : LAPTOPS

/*
 * Solution:
 */

/*
 * Prerequisite:
 * 	-
 */
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.StringTokenizer;

//Your code goes here
public class Main {

	static class ProblemSolver{
		public void solveTheProblem(InputReader in,PrintWriter out){
			int n=in.nextInt();
			ArrayList<Pair> pairs=new ArrayList<Pair>();
			while(n-->0){
				int price=in.nextInt();
				int quality=in.nextInt();
				pairs.add(new Pair(price, quality));
			}
			Collections.sort(pairs);

			for(int i=0;i<pairs.size()-1;++i){
				int quality=pairs.get(i).quality;
				for(int j=i+1;j<pairs.size();++j){
					if(pairs.get(j).quality>quality){
						System.out.println("Happy Alex");
						return;
					}
				}
			}
			System.out.println("Poor Alex");
		}

		class Pair implements Comparable<Pair>,Comparator<Pair>{
			int price;
			int quality;

			public Pair(int price,int quality) {
				this.price=price;
				this.quality=quality;
			}

			public int compareTo(Pair o) {
				return Integer.compare(o.price,this.price);
			}
			public int compare(Pair o1, Pair o2) {
				return (o1.price<o2.price)?1:0;
			}

		}
	}

	//Default template for all the codes
	static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream),32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }

	//Main method for all the codes
	public static void main(String[] args) {
		InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
		ProblemSolver problemSolver = new ProblemSolver();
		problemSolver.solveTheProblem(in, out);
		out.close();
	}

}


//456A : LAPTOPS

/*
 * Solution:
 */

/*
 * Prerequisite:
 * 	-
 */
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.StringTokenizer;

//Your code goes here
public class Main {

	static class ProblemSolver{
		public void solveTheProblem(InputReader in,PrintWriter out){
			int n=in.nextInt();
			ArrayList<Pair> list=new ArrayList<Pair>();
			while(n-->0){
				int cost=in.nextInt();
				int quality=in.nextInt();
				list.add(new Pair(cost, quality));
			}
			Collections.sort(list);
			int lim=list.size();
			out:
			for(int i=0;i<lim-1;++i){
				for(int j=1;j<lim;++i){
					if(list.get(i).quality>list.get(j).quality){
						System.out.println("Happy Alex");
						continue out;
					}
				}
				System.out.println("Poor Alex");
			}
		}

		class Pair implements Comparable<Pair>, Comparator<Pair>{
			int cost;
			int quality;
			public Pair(int cost,int quality) {
				this.cost=cost;
				this.quality=quality;
			}
			public int compare(Pair o1, Pair o2) {
				return (o1.cost<o2.cost)?1:0;
			}
			public int compareTo(Pair o) {
				return Integer.compare(this.cost, o.cost);
			}

		}
	}

	//Default template for all the codes
	static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream),32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }

	//Main method for all the codes
	public static void main(String[] args) {
		InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
		ProblemSolver problemSolver = new ProblemSolver();
		problemSolver.solveTheProblem(in, out);
		out.close();
	}

}


//456A : LAPTOPS

/*
 * Solution:
 */

/*
 * Prerequisite:
 * 	-
 */
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.StringTokenizer;

//Your code goes here
public class Main {

	static class ProblemSolver{
		public void solveTheProblem(InputReader in,PrintWriter out){
			int n=in.nextInt();
			ArrayList<Pair> list=new ArrayList<Pair>();
			while(n-->0){
				int cost=in.nextInt();
				int quality=in.nextInt();
				list.add(new Pair(cost, quality));
			}
			Collections.sort(list);
			int lim=list.size();
			out:
			for(int i=0;i<lim-1;++i){
				for(int j=i+1;j<lim;++j){
					if(list.get(i).quality>list.get(j).quality){
						System.out.println("Happy Alex");
						continue out;
					}
				}
			}
			System.out.println("Poor Alex");
		}

		class Pair implements Comparable<Pair>, Comparator<Pair>{
			int cost;
			int quality;
			public Pair(int cost,int quality) {
				this.cost=cost;
				this.quality=quality;
			}
			public int compare(Pair o1, Pair o2) {
				return (o1.cost<o2.cost)?1:0;
			}
			public int compareTo(Pair o) {
				return Integer.compare(this.cost, o.cost);
			}

		}
	}

	//Default template for all the codes
	static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream),32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }

	//Main method for all the codes
	public static void main(String[] args) {
		InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
		ProblemSolver problemSolver = new ProblemSolver();
		problemSolver.solveTheProblem(in, out);
		out.close();
	}

}


//456A : LAPTOPS

/*
 * Solution:
 */

/*
 * Prerequisite:
 * 	- Sorting
 *  - Comparable Interface
 *  - Logical Reasoning
 */
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;

//Your code goes here
public class Main {

	static class ProblemSolver{

		/*
		 * User defined data structure essential for
		 * the problem. It is highly recommended to use
		 * this data structure as a standard data structrue
		 * as in many cases of competetive programming similar
		 * type of problems are encountered.
		 *
		 *  Comparable interface is implemented to provide ease
		 *  on selective sorting on the basis of the cost
		 */
		class Pair implements Comparable<Pair>{
			int price;
			int quality;

			public Pair(int price,int quality) {
				this.price=price;
				this.quality=quality;
			}

			public int compareTo(Pair o) {
				return Integer.compare(o.price,this.price);
			}

		}

		public void solveTheProblem(InputReader in,PrintWriter out){

			//Declare & scan the necessary inputs
			int n=in.nextInt();
			ArrayList<Pair> pairs=new ArrayList<Pair>();
			while(n-->0){
				int price=in.nextInt();
				int quality=in.nextInt();
				pairs.add(new Pair(price, quality));
			}

			//Sort the inputs on the basis of the cost
			//(from higher to lower in this case)
			Collections.sort(pairs);
			/*
			 * Debugging code:
			 * 	for(Pair p:pairs)System.out.println(p.price+" "p.quality);
			 */

			//Estimation & display of solution
			/*
			 * In the sorted pair we need to find a pair such that
			 * there exist a pair such that quality of the former
			 * is less than the quality of the later to prove that
			 * there exist a pair according to Alex's assumption
			 */
			for(int i=1;i<pairs.size();++i){
				if(pairs.get(i-1).quality<pairs.get(i).quality){
					System.out.println("Happy Alex");
					return;
				}
			}
			System.out.println("Poor Alex");
		}

	}

	//Default template for all the codes
	static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream),32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }

	//Main method for all the codes
	public static void main(String[] args) {
		InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
		ProblemSolver problemSolver = new ProblemSolver();
		problemSolver.solveTheProblem(in, out);
		out.close();
	}

}


//456A : LAPTOPS

/*
 * Solution:
 */

/*
 * Prerequisite:
 * 	- Sorting
 *  - Comparator and comparable
 */
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.StringTokenizer;

//Your code goes here
public class Main {

	static class ProblemSolver{
		public void solveTheProblem(InputReader in,PrintWriter out){
			int n=in.nextInt();
			ArrayList<Pair> pairs=new ArrayList<Pair>();
			while(n-->0){
				int price=in.nextInt();
				int quality=in.nextInt();
				pairs.add(new Pair(price, quality));
			}
			Collections.sort(pairs);
			for(int i=1;i<pairs.size();++i){
				if(pairs.get(i-1).quality<pairs.get(i).quality){
					System.out.println("Happy Alex");
					return;
				}
			}
			System.out.println("Poor Alex");
		}

		class Pair implements Comparable<Pair>{
			int price;
			int quality;

			public Pair(int price,int quality) {
				this.price=price;
				this.quality=quality;
			}

			public int compareTo(Pair o) {
				return Integer.compare(o.price,this.price);
			}

		}
	}

	//Default template for all the codes
	static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream),32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }

	//Main method for all the codes
	public static void main(String[] args) {
		InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
		ProblemSolver problemSolver = new ProblemSolver();
		problemSolver.solveTheProblem(in, out);
		out.close();
	}

}


//456A : LAPTOPS

/*
 * Solution:
 */

/*
 * Prerequisite:
 * 	-
 */
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.StringTokenizer;

//Your code goes here
public class Main {

	static class ProblemSolver{
		public void solveTheProblem(InputReader in,PrintWriter out){
			int n=in.nextInt();
			ArrayList<Pair> list=new ArrayList<Pair>();
			while(n-->0){
				int cost=in.nextInt();
				int quality=in.nextInt();
				list.add(new Pair(cost, quality));
			}
			Collections.sort(list);
			int lim=list.size();
			for(int i=0;i<lim-1;++i){
				for(int j=i+1;j<lim;++j){
					if(list.get(i).quality>list.get(j).quality){
						System.out.println("Happy Alex");
						return;
					}
				}
			}
			System.out.println("Poor Alex");
		}

		class Pair implements Comparable<Pair>, Comparator<Pair>{
			int cost;
			int quality;
			public Pair(int cost,int quality) {
				this.cost=cost;
				this.quality=quality;
			}
			public int compare(Pair o1, Pair o2) {
				return (o1.cost<o2.cost)?1:0;
			}
			public int compareTo(Pair o) {
				return Integer.compare(this.cost, o.cost);
			}

		}
	}

	//Default template for all the codes
	static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream),32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }

	//Main method for all the codes
	public static void main(String[] args) {
		InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
		ProblemSolver problemSolver = new ProblemSolver();
		problemSolver.solveTheProblem(in, out);
		out.close();
	}

}


import java.util.Scanner;
public class Main {
     public static void main(String[] args) {
          Scanner in = new Scanner(System.in);
           int n = in.nextInt();
           int [] a = new int [n] ;
           int [] b = new int [n] ;
           boolean BOL = false ;
           a[0] = in.nextInt();
           b[0] = in.nextInt();
           for (int i=1; i<n; i++){
               a[i] = in.nextInt();
               b[i] = in.nextInt();
                if (a[i]<a[i-1] && b[i]>b[i-1])
                { BOL = true ; break; }
                else if (a[i-1]<a[i] && b[i-1]>b[i])
                { BOL = true ; break; }
                else
            {
                    for (int r=0; r<n; r++){
               for (int m=1; m<n; m++){
                if (a[r]<a[m] && b[r]>b[m])
                { BOL = true ; break; }
           }
            }
           }
           }
           if (BOL==true)
           System.out.println("Happy Alex");
           else if (BOL==false)
           System.out.println("Poor Alex");
}
}


import java.util.Scanner;

public class Main {
     public static void main(String[] args) {
          Scanner in = new Scanner(System.in);
           int n = in.nextInt();
           int [] a = new int [n] ;
           int [] b = new int [n] ;
           boolean BOL = false ;
           a[0] = in.nextInt();
           b[0] = in.nextInt();
           for (int i=1; i<n; i++){
               a[i] = in.nextInt();
               b[i] = in.nextInt();
                if (a[i]<a[i-1] && b[i]>b[i-1])
                { BOL = true ; break; }
                else if (a[i-1]<a[i] && b[i-1]>b[i])
                { BOL = true ; break; }
           }
           if (BOL==true)
           System.out.println("Happy Alex");
           else if (BOL==false)
           System.out.println("Poor Alex");
}
}


import java.util.Scanner;
public class Main {
     public static void main(String[] args) {
          Scanner in = new Scanner(System.in);
           int n = in.nextInt();
           int [] a = new int [n] ;
           int [] b = new int [n] ;
           boolean BOL = false ;
           a[0] = in.nextInt();
           b[0] = in.nextInt();
           int max = b[0] ;
           int min = a[0] ;
           for (int i=1; i<n; i++){
               a[i] = in.nextInt();
               b[i] = in.nextInt();
                 if (b[i]>max || a[i]<min)
                {
                    max = b[i] ;
                    if (a[i]<min)
                    { BOL = true ; break; }
                 min = a[i] ;
                }
                else if (b[i-1]>b[i] && a[i-1]<a[i])
                  { BOL = true ; break ;}
           }
           if (BOL==true)
           System.out.println("Happy Alex");
           else if (BOL==false)
           System.out.println("Poor Alex");
}
}


import java.util.Scanner;
public class Main {
     public static void main(String[] args) {
          Scanner in = new Scanner(System.in);
           int n = in.nextInt();
           int [] a = new int [n] ;
           int [] b = new int [n] ;
           boolean BOL = false ;
           a[0] = in.nextInt();
           b[0] = in.nextInt();
           int max = b[0] ;
           int min = a[0] ;
           for (int i=1; i<n; i++){
               a[i] = in.nextInt();
               b[i] = in.nextInt();
                 if (b[i]>max || a[i]<min)
                {
                    max = b[i] ;
                    if (a[i]<min && b[i]>max)
                    { BOL = true ; break; }
                 min = a[i] ;
                }
                else if (b[i-1]>b[i] && a[i-1]<a[i])
                  { BOL = true ; break ;}
           }
           if (BOL==true)
           System.out.println("Happy Alex");
           else if (BOL==false)
           System.out.println("Poor Alex");
}
}


import java.util.Scanner;

public class Main {
     public static void main(String[] args) {
          Scanner in = new Scanner(System.in);
           int n = in.nextInt();
           int [] a = new int [n] ;
           int [] b = new int [n] ;
           boolean BOL = false ;
           a[0] = in.nextInt();
           b[0] = in.nextInt();
           for (int i=1; i<n; i++){
               a[i] = in.nextInt();
               b[i] = in.nextInt();
           }
           for (int i=0; i<n; i++){
               for (int m=1; m<n; m++){
                if (a[i]<a[m] && b[i]>b[m])
                { BOL = true ; break; }
           }
           }
           if (BOL==true)
           System.out.println("Happy Alex");
           else if (BOL==false)
           System.out.println("Poor Alex");
}
}


import java.util.Scanner;

public class Main {
     public static void main(String[] args) {
          Scanner in = new Scanner(System.in);
           int n = in.nextInt();
           int [] a = new int [n] ;
           int [] b = new int [n] ;
           boolean BOL = false ;
           a[0] = in.nextInt();
           b[0] = in.nextInt();
           for (int i=1; i<n; i++){
               a[i] = in.nextInt();
               b[i] = in.nextInt();
                if (a[i]<a[i-1] && b[i]>b[i-1])
                { BOL = true ; break; }
           }
           if (BOL=true)
           System.out.println("Happy Alex");
           else if (BOL=false)
           System.out.println("Poor Alex");
}
}


import java.util.Scanner;
public class Main {
     public static void main(String[] args) {
          Scanner in = new Scanner(System.in);
          int n = in.nextInt();
          int [] a = new int [n] ;
          int [] b = new int [n] ;
          for (int i=0; i<n; i++)
          {
           a[i] = in.nextInt();
           b[i] = in.nextInt();
           if (a[i]<b[i])
            {  System.out.println("Happy Alex"); break ; }
           else if (i==n-1)
               System.out.println("Poor Alex");
          }
}
}


import java.util.Scanner;
public class Main {
     public static void main(String[] args) {
          Scanner in = new Scanner(System.in);
           int n = in.nextInt();
           int [] a = new int [n] ;
           int [] b = new int [n] ;
           boolean BOL = false ;
           a[0] = in.nextInt();
           b[0] = in.nextInt();
           int max = b[0] ;
           int min = a[0] ;
           for (int i=1; i<n; i++){
               a[i] = in.nextInt();
               b[i] = in.nextInt();
                 if (b[i]>max)
                {
                    max = b[i] ;
                    if (a[i]<min)
                    { BOL = true ; break; }
                 min = a[i] ;
                }
                else if (b[0]>b[i] && a[0]<a[i])
                  { BOL = true ; break ;}
           }
           if (BOL==true)
           System.out.println("Happy Alex");
           else if (BOL==false)
           System.out.println("Poor Alex");
}
}


import java.util.Scanner;

public class Main {
     public static void main(String[] args) {
          Scanner in = new Scanner(System.in);
           int n = in.nextInt();
           int [] a = new int [n] ;
           int [] b = new int [n] ;
           boolean BOL = false ;
           for (int i=0; i<n; i++){
                a[i] = in.nextInt();
                b[i] = in.nextInt();
           }
           int i = 0;
               for (int m=1; m<n; m++){
                if (a[i]<a[m] && b[i]>b[m])
                { BOL = true ; break; }
                if (a[m]<a[i] && b[m]>b[i])
                { BOL = true ; break; }
                if (m==n-1 && i<n-1 )
                  { m = 1 ; i =  i+1 ;}
                if (i==n-1)
                    break ;
           }
           if (BOL==true)
           System.out.println("Happy Alex");
           else if (BOL==false)
           System.out.println("Poor Alex");
}
}


import java.util.Scanner;

public class Main {
     public static void main(String[] args) {
          Scanner in = new Scanner(System.in);
           int n = in.nextInt();
           int [] a = new int [n] ;
           int [] b = new int [n] ;
           boolean BOL = false ;
           for (int i=0; i<n; i++){
                a[i] = in.nextInt();
                b[i] = in.nextInt();
               for (int m=0; m<n; m++){
                if (a[i]<a[m] && b[i]>b[m])
                { BOL = true ; break; }
                if (a[m]<a[i] && b[m]>b[i])
                { BOL = true ; break; }
           }
           }
           if (BOL==true)
           System.out.println("Happy Alex");
           else if (BOL==false)
           System.out.println("Poor Alex");
}
}


import java.util.Scanner;

public class Main {
     public static void main(String[] args) {
          Scanner in = new Scanner(System.in);
           int n = in.nextInt();
           int [] a = new int [n] ;
           int [] b = new int [n] ;
           int X,Y,A,B;
           boolean BOL = false ;
           a[0] = in.nextInt();
           b[0] = in.nextInt();
           for (int i=1; i<n; i++){
               a[i] = in.nextInt();
               b[i] = in.nextInt();
               if(a[i-1] < a[i])
             {
                X = a[i-1];
                Y = a[i];
                A = b[i-1];
                B = b[i];
                a[i-1] = Y;
                a[i] = X;
                b[i-1] = B;
                b[i] = A;
             }
           }
           for (int i=1; i<n; i++){
                if ( b[i]>b[i-1])
                { BOL = true ;
                  break; }
           }
           if (BOL==true)
           System.out.println("Happy Alex");
           else if (BOL==false)
           System.out.println("Poor Alex");
}
}


import java.util.Scanner;

public class Main {
     public static void main(String[] args) {
          Scanner in = new Scanner(System.in);
           int n = in.nextInt();
           int [] a = new int [n] ;
           int [] b = new int [n] ;
           int X,Y,A,B;
           boolean BOL = false ;
           for (int i=0; i<n; i++){
               a[i] = in.nextInt();
               b[i] = in.nextInt();
               for (int m=0; m<i; m++)
                   if(a[m] < a[i])
             {
                X = a[m];
                Y = a[i];
                A = b[m];
                B = b[i];
                a[m] = Y;
                a[i] = X;
                b[m] = B;
                b[i] = A;
             }
           }
           for (int i=1; i<n; i++){
                if ( b[i]>b[i-1])
                { BOL = true ;
                  break; }
           }
           if (BOL==true)
           System.out.println("Happy Alex");
           else if (BOL==false)
           System.out.println("Poor Alex");
}
}


import java.util.Scanner;

public class Main {
     public static void main(String[] args) {
          Scanner in = new Scanner(System.in);
           int n = in.nextInt();
           int [] a = new int [n] ;
           int [] b = new int [n] ;
           boolean BOL = false ;
           for (int i=0; i<n; i++){
                a[i] = in.nextInt();
                b[i] = in.nextInt();
               for (int m=0; m<i; m++){
                if (a[i]<a[m] && b[i]>b[m])
                { BOL = true ; break; }
                if (a[m]<a[i] && b[m]>b[i])
                { BOL = true ; break; }
           }
           }
           if (BOL==true)
           System.out.println("Happy Alex");
           else if (BOL==false)
           System.out.println("Poor Alex");
}
}


import java.util.Scanner;

public class Main {
     public static void main(String[] args) {
          Scanner in = new Scanner(System.in);
           int n = in.nextInt();
           int [] a = new int [n] ;
           int [] b = new int [n] ;
           boolean BOL = false ;
           for (int i=0; i<n; i++){
                a[i] = in.nextInt();
                b[i] = in.nextInt();
               for (int m=0; m<n; m++){
                if (a[i]<a[m] && b[i]>b[m])
                { BOL = true ; break; }
           }
           }
           if (BOL==true)
           System.out.println("Happy Alex");
           else if (BOL==false)
           System.out.println("Poor Alex");
}
}


import java.util.*;

public class Strings {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n;
		n = sc.nextInt();

		int arr[][] = new int[n][2];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < 2; j++) {
				arr[i][j] = sc.nextInt();
			}
		}
		String res = "";

		for (int i = 0; i < n; i++) {

			if (i != n - 1) {
				if ((arr[i][0] < arr[i + 1][0]) && (arr[i][1] > arr[i + 1][1])) {
					res = "Happy Alex";
					break;
				}

			} else {
				res = "Poor Alex";
			}
		}
		System.out.println(res);
	}
}


import java.util.*;

public class Strings {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n;
		n = sc.nextInt();

		int arr[][] = new int[n][2];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < 2; j++) {
				arr[i][j] = sc.nextInt();
			}
		}
		String res = "";

		for (int i = 0; i < n; i++) {

			if (i != n - 1) {
				if ((arr[i][0] < arr[i + 1][0]) && (arr[i][1] > arr[i + 1][1])) {
					res = "Happy Alex";
					break;
				} else {
					res = "Poor Alex";
				}

			}
		}
		System.out.println(res);
	}
}


import java.util.*;

public class Strings {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n;
		n = sc.nextInt();

		int arr[][] = new int[n][2];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < 2; j++) {
				arr[i][j] = sc.nextInt();
			}
		}
		String res = "";

		for (int i = 0; i < n; i++) {

			if (i != n - 1) {
				System.out.println("if" + arr[i][0] + arr[i + 1][0] + arr[i][1] + arr[i + 1][1]);
				if ((arr[i][0] < arr[i + 1][0]) && (arr[i][1] > arr[i + 1][1])) {
					res = "Happy Alex";
					break;
				} else {
					res = "Poor Alex";
				}

			}
		}
		System.out.println(res);
	}
}


import java.util.*;

public class Strings {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n;
		n = sc.nextInt();

		int arr[][] = new int[n][2];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < 2; j++) {
				arr[i][j] = sc.nextInt();
			}
		}
		String res = "";

		for (int i = 0; i < n; i++) {

			if (i != n - 1) {
				if ((arr[i][0] < arr[i + 1][0]) && (arr[i][1] > arr[i + 1][1])) {
					res = "Happy Alex";
					break;
				}

			} else if (i == (n - 1)) {
				if ((arr[i][0] > arr[0][0]) && (arr[i][1] < arr[0][1])) {
					res = "Happy Alex";
					break;
				}
			} else {
				res = "Poor Alex";
			}
		}
		System.out.println(res);
	}
}


import java.util.*;

public class Strings {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n;
		n = sc.nextInt();

		int arr[][] = new int[n][2];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < 2; j++) {
				arr[i][j] = sc.nextInt();
			}
		}
		String res = "";

		for (int i = 0; i < n; i++) {

			if (i != n - 1) {
				if ((arr[i][0] < arr[i + 1][0]) && (arr[i][1] > arr[i + 1][1])) {
					res = "Happy Alex";
					break;
				}

			} else if (i == (n - 1)) {
				if ((arr[i][0] > arr[0][0]) && (arr[i][1] < arr[0][1])) {
					res = "Happy Alex";
				}
			} else {
				res = "Poor Alex";
			}
		}
		System.out.println(res);
	}
}


import java.util.*;

public class Strings {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n;
		n = sc.nextInt();

		int arr[][] = new int[n][2];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < 2; j++) {
				arr[i][j] = sc.nextInt();
			}
		}
		String res = "";

		for (int i = 0; i < n; i++) {

			if (i != n - 1) {
				if ((arr[i][0] < arr[i + 1][0]) && (arr[i][1] > arr[i + 1][1])) {
					res = "Happy Alex";
					break;
				}

			} else if (i == (n - 1)) {
				if ((arr[i][0] > arr[0][0]) && (arr[i][1] < arr[0][1])) {
					res = "Happy Alex";
				} else {
					res = "Poor Alex";
				}
			}
		}
		System.out.println(res);
	}
}


import java.util.*;

public class Strings {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n;
		n = sc.nextInt();

		int arr[][] = new int[n][2];
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < 2; j++) {
				arr[i][j] = sc.nextInt();
			}
		}
		String res = "";

		for (int i = 0; i < n; i++) {

			if (i != n - 1) {
				if ((arr[i][0] < arr[i + 1][0]) && (arr[i][1] > arr[i + 1][1])) {
					res = "Happy Alex";
					break;
				}

			} else if (i == (n - 1)) {
				if ((arr[i][0] > arr[0][0]) && (arr[i][1] < arr[0][1])) {
					res = "Happy Alex";
				} else if ((arr[i][0] < arr[0][0]) && (arr[i][1] > arr[0][1])) {
					res = "Happy Alex";
				} else {
					res = "Poor Alex";
				}
			}
		}
		System.out.println(res);
	}
}


import java.util.Scanner;

/**
 *
 * @author informatica
 */
public class Codeforces {

    public static void main(String[] args) {

        Scanner teclado;

        int nLaps,a ,b, mayorCalidad=0, menorPrecio=1000000;

        Boolean Happy = false;

        teclado = new  Scanner(System.in);

        nLaps = teclado.nextInt();

        int[] precios = new int[nLaps];

        int[] calidades = new int[nLaps];

        for (int i = 0; i < nLaps; i++) {

            a = teclado.nextInt(); // precio

            b = teclado.nextInt(); // calidad

            precios[i] = a;

            calidades[i] = b;
        }

        for (int i = 0; i < calidades.length; i++) {

            if (i == 0) {
                mayorCalidad = calidades[i];

                menorPrecio = precios[i];
            }
            else if (calidades[i] > mayorCalidad) {

                mayorCalidad = calidades[i];

                if(precios[i] < menorPrecio){

                    Happy = true;

                }

            }

            if (i == calidades.length - 1) {
                if (mayorCalidad == calidades[0] && menorPrecio == precios[0]) {
                    Happy = true;
                }
            }

        }

        if (Happy) {
            System.out.println("Happy Alex");
        }
        else{
            System.out.println("Poor Alex");
        }
    }

}


import java.util.Scanner;

/**
 *
 * @author informatica
 */
public class Codeforces {

    public static void main(String[] args) {

        Scanner teclado;

        int nLaps,a ,b;

        Boolean Happy = false;

        teclado = new  Scanner(System.in);

        nLaps = teclado.nextInt();

        int[] precios = new int[nLaps];

        int[] calidades = new int[nLaps];

        for (int i = 0; i < nLaps; i++) {

            a = teclado.nextInt(); // precio

            b = teclado.nextInt(); // calidad

            precios[i] = a;

            calidades[i] = b;
        }

        for (int i = 0; i < calidades.length; i++) {

            for (int j = i + 1; j < precios.length; j++) {

                if (calidades[i] > calidades[j] && precios[i] < precios[j]) {
                    Happy = true;

                    i = calidades.length;
                    break;
                }

            }
        }

        if (Happy) {
            System.out.println("Happy Alex");
        }
        else{
            System.out.println("Poor Alex");
        }
    }

}


import java.util.Scanner;

/**
 *
 * @author informatica
 */
public class Codeforces {

    public static void main(String[] args) {

        Scanner teclado;

        int nLaps, a, b, mayorCalidad = 0, menorPrecio = 0;

        Boolean Happy = false;

        teclado = new Scanner(System.in);

        nLaps = teclado.nextInt();

        int[] precios = new int[nLaps];

        int[] calidades = new int[nLaps];

        for (int i = 0; i < nLaps; i++) {

            a = teclado.nextInt(); // precio

            b = teclado.nextInt(); // calidad

            precios[i] = a;

            calidades[i] = b;
        }

        for (int i = 0; i < calidades.length; i++) {

            if (i == 0) {
                mayorCalidad = calidades[i];

                menorPrecio = precios[i];
            } else if (calidades[i] > mayorCalidad) {

                mayorCalidad = calidades[i];

                if (precios[i] < menorPrecio) {

                    Happy = true;

                }
                else{
                    precios[i] = menorPrecio;
                }

            } else if (precios[i] < menorPrecio) {

                menorPrecio = precios[i];

                if (calidades[i] > mayorCalidad) {

                    Happy = true;

                }
                else{
                    calidades[i] = mayorCalidad;
                }

            }

            if (i == calidades.length - 1) {
                if (mayorCalidad == calidades[0] && menorPrecio == precios[0]) {
                    Happy = true;
                }
            }

        }

        if (Happy) {
            System.out.println("Happy Alex");
        } else {
            System.out.println("Poor Alex");
        }
    }

}


import java.util.Scanner;

/**
 *
 * @author informatica
 */
public class Codeforces {

    public static void main(String[] args) {

        Scanner teclado;

        int nLaps,a ,b;

        Boolean Happy = false;

        teclado = new  Scanner(System.in);

        nLaps = teclado.nextInt();

        int[] precios = new int[nLaps];

        int[] calidades = new int[nLaps];

        for (int i = 0; i < nLaps; i++) {

            a = teclado.nextInt(); // precio

            b = teclado.nextInt(); // calidad

            precios[i] = a;

            calidades[i] = b;
        }

        for (int i = 0; i < calidades.length; i++) {

            for (int j = i + 1; j < precios.length; j++) {

                if (calidades[i] > calidades[j] && precios[i] < precio[j]) {
                    Happy = true;

                    i = calidades.length;
                    break;
                }

            }
        }

        if (Happy) {
            System.out.println("Happy Alex");
        }
        else{
            System.out.println("Poor Alex");
        }
    }

}


import java.io.IOException;

import java.util.Scanner;

public class Prueba {

    public static void main(String[] args) throws IOException {

        Scanner reader;
        int n,p,q;
        Boolean Happy=false;
        int px[],qx[];

        reader = new Scanner(System.in);
        n = reader.nextInt();

        px = new  int[n];
        qx = new int[n];

        for (int i = 0; i < n; i++) {

            p = reader.nextInt(); //price
            q = reader.nextInt(); //Quality

            px[i] = p;
            qx[i] = q;

            for (int j = 0; j < i; j++) {

                if ((px[i] < px[j] && qx[i] > qx[j]) || (px[i] > px[j] &&  qx[i] < qx[j])) {
                    Happy = true;
                    i = n;
                    break;
                }
            }
        }

        if (Happy) {
            System.out.println("Happy Alex");
        }
        else{
            System.out.println("Poor Alex");
        }
    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Ejercicio {

    public static void main(String[] args) throws IOException {

        BufferedReader reader;
        int n,p,q;
        Boolean Happy=false;
        String cad;
        int px[],qx[];

        reader = new BufferedReader(new InputStreamReader(System.in));
        n = Integer.parseInt(reader.readLine());

        px = new  int[n];
        qx = new int[n];

        for (int i = 0; i < n; i++) {

            p = reader.read(); //price
            q = reader.read(); //Quality

            px[i] = p;
            qx[i] = q;

            for (int j = 0; j < i; j++) {

                if ((px[i] < px[j] && qx[i] > qx[j]) || (px[i] > px[j] &&  qx[i] < qx[j])) {
                    Happy = true;
                    i = n;
                    break;
                }
            }
        }

        if (Happy) {
            System.out.println("Happy Alex");
        }
        else{
            System.out.println("Poor Alex");
        }
    }

}


import java.io.IOException;
import java.util.Scanner;

public class Prueba {

    public static void main(String[] args) throws IOException {

        Scanner reader;
        int n, p, q;
        Boolean Happy = false;
        int px[], qx[];

        reader = new Scanner(System.in);
        n = reader.nextInt();

        px = new int[n];
        qx = new int[n];

        for (int i = 0; i < n; i++) {

            p = reader.nextInt(); //price
            q = reader.nextInt(); //Quality

            if (p != q) {
                Happy = true;
                break;
            }
        }

        if (Happy) {
            System.out.println("Happy Alex");
        } else {
            System.out.println("Poor Alex");
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Ejercicio {

    public static void main(String[] args) throws IOException {

        BufferedReader reader;
        int n,p,q;
        Boolean Happy=false;
        String cad;
        int px[],qx[];

        reader = new BufferedReader(new InputStreamReader(System.in));
        n = Integer.parseInt(reader.readLine());

        px = new  int[n];
        qx = new int[n];

        for (int i = 0; i < n; i++) {

            p = reader.read(); //price
            q = reader.read(); //Quality

            px[i] = p;
            qx[i] = q;

            for (int j = 0; j < i; j++) {

                if ((px[i] < px[j] && qx[i] > qx[j]) || (px[j] < px[i] &&  qx[j] > qx[i])) {
                    Happy = true;
                    i = n;
                    break;
                }
            }
        }

        if (Happy) {
            System.out.println("Happy Alex");
        }
        else{
            System.out.println("Poor Alex");
        }
    }

}


import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import java.util.Scanner;

public class Prueba {

    public static void main(String[] args) throws IOException {

        Scanner reader;
        int n, p, q;
        Boolean Happy = false;
        Integer px[], qx[];
        List<Integer> pxL;
        List<Integer> qxL;

        reader = new Scanner(System.in);
        n = reader.nextInt();

        px = new Integer[n];
        qx = new Integer[n];

        for (int i = 0; i < n; i++) {

            p = reader.nextInt(); //price
            q = reader.nextInt(); //Quality

            px[i] = p;
            qx[i] = q;
        }

        pxL = new ArrayList<>(Arrays.asList(px));
        qxL = new ArrayList<>(Arrays.asList(qx));

        Arrays.sort(px); //menor a mayor
        Arrays.sort(qx); //menor a mayor

        int indx1,indx2;

        for (int i = 0; i < n; i++) { //recorrer de menor a mayor

            if (!pxL.isEmpty()) {
                indx1 = pxL.indexOf(px[i]);
                indx2 = qxL.indexOf(qx[i]);
                if (indx1 != indx2) {
                    Happy = true;
                    break;
                }
                pxL.remove(indx1);
                qxL.remove(indx2);
            }
        }

        if (Happy) {
            System.out.println("Happy Alex");
        } else {
            System.out.println("Poor Alex");
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Ejercicio {

    public static void main(String[] args) throws IOException {

        BufferedReader reader;
        int n,p,q;
        Boolean Happy=false;
        int px[],qx[];

        reader = new BufferedReader(new InputStreamReader(System.in));
        n = Integer.parseInt(reader.readLine());

        px = new  int[n];
        qx = new int[n];

        for (int i = 0; i < n; i++) {

            p = reader.read(); //price
            q = reader.read(); //Quality

            px[i] = p;
            qx[i] = q;

            for (int j = 0; j < i; j++) {

                if ((px[i] < px[j] && qx[i] > qx[j]) || (px[i] > px[j] &&  qx[i] < qx[j])) {
                    Happy = true;
                    i = n;
                    break;
                }
            }
        }

        if (Happy) {
            System.out.println("Happy Alex");
        }
        else{
            System.out.println("Poor Alex");
        }
    }

}


import java.util.Scanner;

/**
 *
 * @author informatica
 */
public class Codeforces {

    public static void main(String[] args) {

        Scanner teclado;

        int nLaps, a, b, mayorCalidad = 0, menorPrecio = 0;

        Boolean Happy = false;

        teclado = new Scanner(System.in);

        nLaps = teclado.nextInt();

        int[] precios = new int[nLaps];

        int[] calidades = new int[nLaps];

        for (int i = 0; i < nLaps; i++) {

            a = teclado.nextInt(); // precio

            b = teclado.nextInt(); // calidad

            precios[i] = a;

            calidades[i] = b;
        }

        for (int i = 0; i < calidades.length; i++) {

            if (i == 0) {
                mayorCalidad = calidades[i];

                menorPrecio = precios[i];
            } else if (calidades[i] > mayorCalidad) {

                mayorCalidad = calidades[i];

                if (precios[i] < menorPrecio) {

                    Happy = true;

                }

            } else if (precios[i] < menorPrecio) {

                menorPrecio = precios[i];

                if (calidades[i] > mayorCalidad) {

                    Happy = true;

                }

            }

            if (i == calidades.length - 1) {
                if (mayorCalidad == calidades[0] && menorPrecio == precios[0]) {
                    Happy = true;
                }
            }

        }

        if (Happy) {
            System.out.println("Happy Alex");
        } else {
            System.out.println("Poor Alex");
        }
    }

}


import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import java.util.Scanner;

public class Prueba {

    public static void main(String[] args) throws IOException {

        Scanner reader;
        int n, p, q;
        Boolean Happy = false;
        Integer px[], qx[];
        List<Integer> pxL;
        List<Integer> qxL;

        reader = new Scanner(System.in);
        n = reader.nextInt();

        px = new Integer[n];
        qx = new Integer[n];

        for (int i = 0; i < n; i++) {

            p = reader.nextInt(); //price
            q = reader.nextInt(); //Quality

            px[i] = p;
            qx[i] = q;
        }

        pxL =  new ArrayList<>(Arrays.asList(px));
        qxL = new ArrayList<>(Arrays.asList(qx));

        Arrays.sort(px); //menor a mayor
        Arrays.sort(qx); //menor a mayor

        for (int i = 0; i < n; i++) { //recorrer de menor a mayor

            if (pxL.indexOf(px[i]) != qxL.indexOf(qx[i])) {
                Happy = true;
                break;
            }
        }

        if (Happy) {
            System.out.println("Happy Alex");
        } else {
            System.out.println("Poor Alex");
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Ejercicio {

    public static void main(String[] args) throws IOException {

        BufferedReader reader;
        int n,p,q;
        Boolean Happy=false;
        String cad;
        int px[],qx[];

        reader = new BufferedReader(new InputStreamReader(System.in));
        n = Integer.parseInt(reader.readLine());

        px = new  int[n];
        qx = new int[n];

        for (int i = 0; i < n; i++) {

            cad = reader.readLine();
            p = Integer.parseInt(cad.substring(0,1)); //price
            q = Integer.parseInt(cad.substring(2)); //Quality

            px[i] = p;
            qx[i] = q;

            for (int j = 0; j < i; j++) {

                if ((px[i] < px[j] && qx[i] > qx[j]) || (px[j] < px[i] &&  qx[j] > qx[i])) {
                    Happy = true;
                    i = n;
                    break;
                }
            }
        }

        if (Happy) {
            System.out.println("Happy Alex");
        }
        else{
            System.out.println("Poor Alex");
        }
    }

}


import java.io.IOException;
import java.util.Arrays;

import java.util.Scanner;

public class Prueba {

    public static void main(String[] args) throws IOException {

        Scanner reader;
        int n,p,q;
        Boolean Happy=false;
        int px[],qx[],pxOrd[],qxOrd[],qxOrdCopy[];

        reader = new Scanner(System.in);
        n = reader.nextInt();

        px = new  int[n];
        qx = new int[n];
        pxOrd = new  int[n];
        qxOrd = new int[n];
        qxOrdCopy = new int[n];

        for (int i = 0; i < n; i++) {

            p = reader.nextInt(); //price
            q = reader.nextInt(); //Quality

            px[i] = p;
            qx[i] = q;

        }

        System.arraycopy(px, 0, pxOrd, 0, n);
        System.arraycopy(qx, 0, qxOrd, 0, n);

        Arrays.sort(pxOrd); //menor a mayor
        Arrays.sort(qxOrd); //menor a mayor

        for (int i = 0; i < n; i++) { //recorrer de menor a mayor

            for (int j = 0; j < n; j++) {

                if (qx[j] == qxOrd[i]){ //qx[j] calidad encontrada

                    if (!(px[j] == pxOrd[i])) { //el precio debe ser igual al precio en la posicion de la calidad
                        Happy = true;
                        i = n;
                        break;
                    }

                }
            }
        }

        if (Happy) {
            System.out.println("Happy Alex");
        }
        else{
            System.out.println("Poor Alex");
        }
    }

}


import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;

import java.util.Scanner;

public class Prueba {

    public static void main(String[] args) throws IOException {

        Scanner reader;
        int n, p, q;
        Boolean Happy = false;
        Integer px[], qx[];
        List<Integer> pxL;
        List<Integer> qxL;

        reader = new Scanner(System.in);
        n = reader.nextInt();

        px = new Integer[n];
        qx = new Integer[n];

        for (int i = 0; i < n; i++) {

            p = reader.nextInt(); //price
            q = reader.nextInt(); //Quality

            px[i] = p;
            qx[i] = q;
        }

        pxL = new ArrayList<>(Arrays.asList(px));
        qxL = new ArrayList<>(Arrays.asList(qx));

        Arrays.sort(px); //menor a mayor
        Arrays.sort(qx); //menor a mayor

        int indx1;

        for (int i = 0; i < n; i++) { //recorrer de menor a mayor

            indx1 = pxL.indexOf(px[i]); //indice precio

            if (!Objects.equals(qxL.get(indx1), qx[i])){
                Happy = true;
                break;
            }
        }

        if (Happy) {
            System.out.println("Happy Alex");
        } else {
            System.out.println("Poor Alex");
        }
    }
}


import java.util.Scanner;

public class laptops {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		int x= scan.nextInt();
		boolean flag = false;
int min1=Integer.MAX_VALUE;
int min2=Integer.MAX_VALUE;
		for(int i=0; i<x; i++) {
			int m= scan.nextInt();
			int n= scan.nextInt();
			if(i==0) {
				min1=m;
			min2=n;
			}

			if((m<min1 && n<min2) || (m>min1 && n>min2)) {
				flag = true;
			}
			 min1=m;
			 min2=n;

		}
		if(flag)
			System.out.println("Poor Alex");
		else
			System.out.println("Happy Alex");
	}

}


import java.util.Scanner;

public class laptops {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		int x= scan.nextInt();
		boolean flag = true;

		if(x==3) {
int [][] A = new int [3][2];
for(int i=0; i<3; i++) {
	for(int j=0; j<2; j++) {
		A[i][j]= scan.nextInt();
	}

}
int [][] C= sort(A);

for(int i=1; i<3; i++) {
	if(C[i][1]<C[i-1][1])
		flag = false;
}
}

		if(x!=3) {
int min1=Integer.MAX_VALUE;
int min2=Integer.MAX_VALUE;
		for(int i=0; i<x; i++) {
			int m= scan.nextInt();
			int n= scan.nextInt();
			if(i==0) {
				min1=m;
			min2=n;
			}

			if((m<min1 && n>min2) || (m>min1 && n<min2) ) {
				flag = false;
			}

			 min1=m;
			 min2=n;

		}
		}
		if(flag)
			System.out.println("Poor Alex");
		else
			System.out.println("Happy Alex");
	}
public static int [][] sort(int [][] A){
int [][] C= new int [3][2];
int save =0;
int save2=0;
int min=Integer.MAX_VALUE;
for(int i=0; i<3; i++) {
	if(min>A[i][0]) {
		min=A[i][0];
		save=i;
}
}
C[0][0]=A[save][0];
C[0][1]=A[save][1];
int max= Integer.MIN_VALUE;

for(int i=0; i<3; i++) {
	if(max<A[i][0]) {
		max=A[i][0];
		save2=i;
}
}
C[2][0]=A[save2][0];
C[2][1]=A[save2][1];

int save3=0+1+2-save - save2;
C[1][0]=A[save3][0];
C[1][1]=A[save3][1];

return C;
}
}


import java.util.Scanner;

public class laptops {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		int x= scan.nextInt();
		boolean flag = false;

		for(int i=0; i<x; i++) {
			int m= scan.nextInt();
			int n= scan.nextInt();
			int min1=m;
			int min2=n;
			if(m<min1 && n<min2) {
				flag = true;
			}

		}
		if(flag)
			System.out.println("Poor Alex");
		else
			System.out.println("Happy Alex");
	}

}


import java.util.Scanner;

public class laptops {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		int x= scan.nextInt();
		boolean flag = true;
int min1=Integer.MAX_VALUE;
int min2=Integer.MAX_VALUE;
		for(int i=0; i<x; i++) {
			int m= scan.nextInt();
			int n= scan.nextInt();
			if(i==0) {
				min1=m;
			min2=n;
			}

			if((m<min1 && n>min2) || (m>min1 && n<min2)) {
				flag = false;
			}
			 min1=m;
			 min2=n;

		}
		if(flag)
			System.out.println("Poor Alex");
		else
			System.out.println("Happy Alex");
	}

}


import java.util.Scanner;

public class laptops {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		int x= scan.nextInt();
		boolean flag = false;
int min1=Integer.MAX_VALUE;
int min2=Integer.MAX_VALUE;
		for(int i=0; i<x; i++) {
			int m= scan.nextInt();
			int n= scan.nextInt();
			if(i==0) {
				min1=m;
			min2=n;
			}
			flag = false;

			if((m<min1 && n<min2) || (m>min1 && n>min2)) {
				flag = true;
			}
			 min1=m;
			 min2=n;

		}
		if(flag)
			System.out.println("Poor Alex");
		else
			System.out.println("Happy Alex");
	}

}


import java.util.Scanner;

public class laptops {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		int x= scan.nextInt();
		boolean flag = false;
int min1=Integer.MAX_VALUE;
int min2=Integer.MAX_VALUE;
		for(int i=0; i<x; i++) {
			int m= scan.nextInt();
			int n= scan.nextInt();
			if(i==0) {
				min1=m;
			min2=n;
			}

			if(m<min1 && n<min2) {
				flag = true;
			}
			 min1=m;
			 min2=n;

		}
		if(flag)
			System.out.println("Poor Alex");
		else
			System.out.println("Happy Alex");
	}

}


import java.util.Scanner;

public class laptops {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		int x= scan.nextInt();
		boolean flag = true;

		if(x==3) {
int [][] A = new int [3][2];
for(int i=0; i<3; i++) {
	for(int j=0; j<2; j++) {
		A[i][j]= scan.nextInt();
	}

}
int [][] C= sort(A);
for(int i=0; i<3; i++) {
	for(int j=0; j<2; j++) {
		System.out.print(C[i][j] + " ");
	}
	System.out.println();
}
for(int i=1; i<3; i++) {
	if(C[i][1]<C[i-1][1])
		flag = false;
}
}

		if(x!=3) {
int min1=Integer.MAX_VALUE;
int min2=Integer.MAX_VALUE;
		for(int i=0; i<x; i++) {
			int m= scan.nextInt();
			int n= scan.nextInt();
			if(i==0) {
				min1=m;
			min2=n;
			}

			if((m<min1 && n>min2) || (m>min1 && n<min2) ) {
				flag = false;
			}

			 min1=m;
			 min2=n;

		}
		}
		if(flag)
			System.out.println("Poor Alex");
		else
			System.out.println("Happy Alex");
	}
public static int [][] sort(int [][] A){
int [][] C= new int [3][2];
int save =0;
int save2=0;
int min=Integer.MAX_VALUE;
for(int i=0; i<3; i++) {
	if(min>A[i][0]) {
		min=A[i][0];
		save=i;
}
}
C[0][0]=A[save][0];
C[0][1]=A[save][1];
int max= Integer.MIN_VALUE;

for(int i=0; i<3; i++) {
	if(max<A[i][0]) {
		max=A[i][0];
		save2=i;
}
}
C[2][0]=A[save2][0];
C[2][1]=A[save2][1];

int save3=0+1+2-save - save2;
C[1][0]=A[save3][0];
C[1][1]=A[save3][1];

return C;
}
}


import java.util.Scanner;

public class laptops {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scan = new Scanner(System.in);
		int x= scan.nextInt();
		boolean flag = false;
int min1=Integer.MAX_VALUE;
int min2=Integer.MAX_VALUE;
		for(int i=0; i<x; i++) {
			int m= scan.nextInt();
			int n= scan.nextInt();

			if(m<min1 && n<min2) {
				flag = true;
			}
			 min1=m;
			 min2=n;

		}
		if(flag)
			System.out.println("Poor Alex");
		else
			System.out.println("Happy Alex");
	}

}


import java.util.Scanner;
public class A {
 public static void main(String[] args) {
	    Scanner sc=new Scanner(System.in);
	    int n=sc.nextInt();
	    int a,b,count=0;

	    for(int i=0;i<n;i++){
	    	      a=sc.nextInt();
	    		  b=sc.nextInt();
	    		if(a<b) count++;

	    	 }
	    System.out.println((count>0)?"Happy Alex":"Poor Alex");

 }
	}


import java.util.Arrays;
import java.util.Scanner;
public class A {
 public static void main(String[] args) {
	    Scanner sc=new Scanner(System.in);
	    int n=sc.nextInt();
	    int a[][]=new int[n][2];
	    for(int i=0;i<n;i++){

	    		  a[i][0]=sc.nextInt();
	    		  a[i][1]=sc.nextInt();

	    } int c=0;
	    for(int i=0;i<n;i++){
	    	for(int j=i+1;j<n;j++){
	    		 if((a[i][0]>a[j][0] && a[i][1]<a[j][1]) || (a[i][0]<a[j][0] && a[i][1]>a[j][1] ))
	    		 {	c++;
	    		    break;
	    		 }
	    	}
	    }
	    System.out.println((c!=0)?"Happy Alex":"Poor Alex");
 }
	}


import java.util.Arrays;
import java.util.Scanner;
public class A {
 public static void main(String[] args) {
	    Scanner sc=new Scanner(System.in);
	    int n=sc.nextInt();
	    int a[]=new int[n];
	    int b[]=new int[n];
	    int count=0;
	    for(int i=0;i<n;i++){
	    	      a[i]=sc.nextInt();
	    		  b[i]=sc.nextInt();
	    		  if(a[i]==b[i]) count++;

	    }
	    if(count==n) System.out.println("Poor Alex");
	    else {int c=0;
	    for(int i=0;i<n;i++){
	    	for(int j=i+1;j<n;j++){
	    		 if((a[i]>a[j] && b[i]<b[j]) || (a[i]<a[j]  && b[i]>b[j] ))
	    		 {	c++;
	    		    break;
	    		 }
	    	}
	    	if(c>0) break;
	    }
	    System.out.println((c!=0)?"Happy Alex":"Poor Alex");
	    }
 }
	}


import java.util.Scanner;
public class A {
 public static void main(String[] args) {
	    Scanner sc=new Scanner(System.in);
	    int n=sc.nextInt();
	    int a[]=new int[n];
	    int b[]=new int[n];
	    long count1=0;
	    for(int i=0;i<n;i++){
	    	      a[i]=sc.nextInt();
	    		  b[i]=sc.nextInt();
	    		  if(a[i]==b[i])
	    		  count1++;

	    	 }
	    if(count1==n) System.out.println("Poor Alex");
	    else {int c=0;
	    for(int i=0;i<n;i++){
	    	for(int j=i+1;j<n;j++){
	    		 if((a[i]>a[j] && b[i]<b[j]) || (a[i]<a[j]  && b[i]>b[j]))
	    		 {	c++;
	    		    break;
	    		 }
	    	}
	    	if(c>0) break;
	    }
	    System.out.println((c!=0)?"Happy Alex":"Poor Alex");
	    }
 }
	}


import java.util.Arrays;
import java.util.Scanner;
public class A {
 public static void main(String[] args) {
	    Scanner sc=new Scanner(System.in);
	    int n=sc.nextInt();
	    int a[]=new int[n];
	    int b[]=new int[n];
	    for(int i=0;i<n;i++){

	    		  a[i]=sc.nextInt();
	    		  b[i]=sc.nextInt();
	   }
	   for(int i=0;i<=n-2;i++){
		    for(int j=0;j<=n-2-i;j++){
		    	if(a[j]>a[j+1]){
		    		 int t=a[j];
		    		 a[j]=a[j+1];
		    		 a[j+1]=a[j];
		    		 int p=b[j];
		    		 b[j]=b[j+1];
		    		 b[j+1]=p;
		    	}
		    }
	   }
	    int c=0;
	    for(int i=0;i<n;i++){
	       for(int j=i+1;j<n;j++){
	    	   if( b[i]>b[j]) {
	    		   c++;
	    		   break;
	    	   }

	       }
	       if(c>0) break;
	    }
	    System.out.println((c!=0)?"Happy Alex":"Poor Alex");
 }
	}


import java.util.Arrays;
import java.util.Scanner;
public class A {
 public static void main(String[] args) {
	    Scanner sc=new Scanner(System.in);
	    int n=sc.nextInt();
	    int a[]=new int[n];
	    int b[]=new int[n];
	    int count=0;
	    for(int i=0;i<n;i++){

	    		  a[i]=sc.nextInt();
	    		  b[i]=sc.nextInt();
	    		  if(a[i]==b[i]) count++;

	    } int c=0;
	    if(count==n) System.out.println("Poor Alex");
	    else {
	    for(int i=0;i<n;i++){
	    	for(int j=i+1;j<n;j++){
	    		 if((a[i]>a[j] && b[i]<b[j]) || (a[i]<a[j]  && b[i]>b[j] ))
	    		 {	c++;
	    		    break;
	    		 }
	    	}
	    	if(c>0) break;
	    }
	    System.out.println((c!=0)?"Happy Alex":"Poor Alex");
	    }
 }
	}


import java.util.Arrays;
import java.util.Scanner;
public class A {
 public static void main(String[] args) {
	    Scanner sc=new Scanner(System.in);
	    int n=sc.nextInt();
	    int a[]=new int[n];
	    int b[]=new int[n];
	    int count1=0,count2=0;
	    for(int i=0;i<n;i++){
	    	      a[i]=sc.nextInt();
	    		  b[i]=sc.nextInt();
	    		  if(a[i]==b[i] && a[i]<a[i+1] && b[i]<b[i+1]) {
	    		  count1++;
	    		  count2++;
	    		  }

	    }
	    if(count1==n) System.out.println("Poor Alex");
	    else {int c=0;
	    for(int i=0;i<n;i++){
	    	for(int j=i+1;j<n;j++){
	    		 if((a[i]>a[j] && b[i]<b[j]) || (a[i]<a[j]  && b[i]>b[j] ))
	    		 {	c++;
	    		    break;
	    		 }
	    	}
	    	if(c>0) break;
	    }
	    System.out.println((c!=0)?"Happy Alex":"Poor Alex");
	    }
 }
	}


import java.util.Arrays;
import java.util.Scanner;
public class A {
 public static void main(String[] args) {
	    Scanner sc=new Scanner(System.in);
	    int n=sc.nextInt();
	    int a[][]=new int[n][2];
	    for(int i=0;i<n;i++){
	    	 for(int j=0;j<2;j++){
	    		  a[i][j]=sc.nextInt();
	    	 }
	    } int c=0;
	    for(int i=0;i<n;i++){
	    	for(int j=i+1;j<n;j++){
	    		 if((a[i][0]>a[j][0] && a[i][1]<a[j][1]) || (a[i][0]<a[j][0] && a[i][1]>a[j][1] ))
	    		 {	c++;
	    		    break;
	    		 }
	    	}
	    	if(c>0) break;
	    }
	    System.out.println((c!=0)?"Happy Alex":"Poor Alex");
 }
	}


import java.util.Arrays;
import java.util.Scanner;
public class A {
 public static void main(String[] args) {
	    Scanner sc=new Scanner(System.in);
	    int n=sc.nextInt();
	    int a[][]=new int[n][2];
	    for(int i=0;i<n;i++){
	    	 for(int j=0;j<2;j++){
	    		  a[i][j]=sc.nextInt();
	    	 }
	    } int c=0;
	    for(int i=0;i<n;i++){
	    	for(int j=i+1;j<n;j++){
	    		 if((a[i][0]>a[j][0] && a[i][1]<a[j][1]) || (a[i][0]<a[j][0] && a[i][1]>a[j][1] ))
	    		 {	c++;
	    		    break;
	    		 }
	    	}
	    }
	    System.out.println((c!=0)?"Happy Alex":"Poor Alex");
 }
	}


import java.util.Arrays;
import java.util.Scanner;
public class A {
 public static void main(String[] args) {
	    Scanner sc=new Scanner(System.in);
	     int n=sc.nextInt();
	    long a[]=new long[n];
	    long b[]=new long[n];
	    for(int i=0;i<n;i++){

	    		  a[i]=sc.nextLong();
	    		  b[i]=sc.nextLong();
	   }
	   for(int i=0;i<=n-2;i++){
		    for(int j=0;j<=n-2-i;j++){
		    	if(a[j]>a[j+1]){
		    		 long t=a[j];
		    		 a[j]=a[j+1];
		    		 a[j+1]=a[j];
		    		 long p=b[j];
		    		 b[j]=b[j+1];
		    		 b[j+1]=p;
		    	}
		    }
	   }
	    int c=0;
	    for(int i=0;i<n;i++){
	       for(int j=i+1;j<n;j++){
	    	   if( b[i]>b[j]) {
	    		   c++;
	    		   break;
	    	   }

	       }
	       if(c>0) break;
	    }
	    System.out.println((c!=0)?"Happy Alex":"Poor Alex");
 }
	}