class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: C = None
        self.z: H = None
        self.t: B = None
        self.r: I = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: G = None
        self.w: I = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: C = None
        self.t: H = None
        self.y: C = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: H = None
        self.z: G = None
        self.w: F = None
        self.o: H = None
        self.r: C = None
        self.x: D = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: B = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: E = None
        self.w: B = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: A = None
        self.r: D = None
        self.o: E = None
        self.q: G = None
        self.u: E = None
        self.w: A = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: A = None
        self.y: B = None
        self.u: G = None
        self.v: G = None
        self.x: F = None
        self.q: A = None
        self.s: B = None
        self.r: E = None
        self.txt = txt

f = A("f")
c = B("c")
h = C("h")
a = D("a")
d = E("d")
g = F("g")
k = G("k")
b = H("b")
j = I("j")

f.p = c
f.t = c
f.o = h
f.z = b
f.r = j
f.s = g
c.o = b
c.z = k
c.w = j
c.p = a
h.p = f
a.v = f
a.r = h
a.y = h
a.t = b
a.z = b
d.u = j
d.v = b
d.o = b
d.z = k
d.w = g
d.r = h
d.p = h
d.x = a
g.u = j
g.t = c
g.y = f
k.t = f
k.s = d
k.w = c
k.u = j
b.t = c
b.s = f
b.w = f
b.r = a
b.o = d
b.u = d
b.q = k
b.x = j
j.t = f
j.z = f
j.q = f
j.y = c
j.s = c
j.u = k
j.v = k
j.x = g
j.r = d
assert h.p.r.y.p.t.txt == "
class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: C = None
        self.z: H = None
        self.t: B = None
        self.r: I = None
        self.s: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: G = None
        self.w: I = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: C = None
        self.t: H = None
        self.y: C = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: H = None
        self.z: G = None
        self.w: F = None
        self.o: H = None
        self.r: C = None
        self.x: D = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: B = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: E = None
        self.w: B = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: A = None
        self.r: D = None
        self.o: E = None
        self.q: G = None
        self.u: E = None
        self.w: A = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: A = None
        self.y: B = None
        self.u: G = None
        self.v: G = None
        self.x: F = None
        self.q: A = None
        self.s: B = None
        self.r: E = None
        self.txt = txt

f = A("f")
c = B("c")
h = C("h")
a = D("a")
d = E("d")
g = F("g")
k = G("k")
b = H("b")
j = I("j")

f.p = c
f.t = c
f.o = h
f.z = b
f.r = j
f.s = g
c.o = b
c.z = k
c.w = j
c.p = a
h.p = f
a.v = f
a.r = h
a.y = h
a.t = b
a.z = b
d.u = j
d.v = b
d.o = b
d.z = k
d.w = g
d.r = h
d.p = h
d.x = a
g.u = j
g.t = c
g.y = f
k.t = f
k.s = d
k.w = c
k.u = j
b.t = c
b.s = f
b.w = f
b.r = a
b.o = d
b.u = d
b.q = k
b.x = j
j.t = f
j.z = f
j.q = f
j.y = c
j.s = c
j.u = k
j.v = k
j.x = g
j.r = d
assert h.p.r.y.p.t.txt == "b"