gap> P:=ClosedSurface(-1);
Simplicial complex of dimension 2.

gap> K:=ClosedSurface(-2);
Simplicial complex of dimension 2.

gap> T:=ClosedSurface(1);
Simplicial complex of dimension 2.

gap> M:=ConnectedSum(K,P);
Simplicial complex of dimension 2.

gap> N:=ConnectedSum(T,P);
Simplicial complex of dimension 2.

gap> Homology(M,0);
[ 0 ]
gap> Homology(N,0);
[ 0 ]
gap> Homology(M,1);
[ 2, 0, 0 ]
gap> Homology(N,1);
[ 2, 0, 0 ]
gap> Homology(M,2);
[  ]
gap> Homology(N,2);
[  ]
