Quick question - laplace equation

So the quesiton I had was

1) solve grad^2 phi_1 = 0, subject to phi_1(x,0)=x and phi_1(x,pi)=phi_1(0,y)=phi_1(pi,y)=0

I did this fine.

2) solve grad^2 phi_2 = 0, subject to phi_1(0,y)=y and phi_2(x,0)=phi_2(x,pi)=phi_(pi,y)=0

So with this x and y are interchanged in the answer I believe, but here's where i'm stuck:

3) solve grad^2 phi= 0, subject to phi(x,0)=x, phi(0,y)=y and phi(x,pi)=phi(pi,y)=0

i.e it's a combination of the first two, I guess there's a quick way to get a solution for this, but unware what it is...

btw, all of this is in the square domain D, with 0 <= x <= pi, 0 <= y <= pi