class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: B = None
        self.t: D = None
        self.o: G = None
        self.y: B = None
        self.x: B = None
        self.u: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: D = None
        self.q: H = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: F = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: H = None
        self.r: E = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: I = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: B = None
        self.p: B = None
        self.o: E = None
        self.u: B = None
        self.r: E = None
        self.w: G = None
        self.txt = txt

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

c.p = l
c.z = e
c.y = e
c.x = e
c.t = b
c.o = f
c.u = f
e.z = i
e.u = c
e.v = c
e.p = c
e.s = j
e.w = j
e.q = f
e.t = a
e.r = d
j.u = f
j.p = b
j.q = l
j.z = a
b.t = h
i.y = f
i.o = d
i.u = b
d.q = i
d.o = f
f.z = j
f.t = h
f.r = i
f.p = b
l.r = b
l.p = a
l.w = i
a.t = e
a.x = e
a.p = e
a.u = e
a.o = i
a.r = i
a.w = f
h.r = b
h.p = a
h.w = i
assert l.p.x.z.u.t.r.t.r.t.txt == "
class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: B = None
        self.t: D = None
        self.o: G = None
        self.y: B = None
        self.x: B = None
        self.u: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: D = None
        self.q: H = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: F = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: H = None
        self.r: E = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: I = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: B = None
        self.p: B = None
        self.o: E = None
        self.u: B = None
        self.r: E = None
        self.w: G = None
        self.txt = txt

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

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