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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: F = None
        self.z: I = None
        self.y: E = None
        self.x: B = None
        self.t: H = None
        self.o: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: I = None
        self.y: I = None
        self.v: J = None
        self.p: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: C = None
        self.y: E = None
        self.u: C = None
        self.q: A = None
        self.z: D = None
        self.p: D = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: J = None
        self.o: I = None
        self.q: J = None
        self.y: F = None
        self.s: E = None
        self.v: G = None
        self.x: C = None
        self.w: C = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: F = None
        self.z: I = None
        self.y: E = None
        self.x: B = None
        self.t: H = None
        self.o: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: I = None
        self.y: I = None
        self.v: J = None
        self.p: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: C = None
        self.y: E = None
        self.u: C = None
        self.q: A = None
        self.z: D = None
        self.p: D = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: J = None
        self.o: I = None
        self.q: J = None
        self.y: F = None
        self.s: E = None
        self.v: G = None
        self.x: C = None
        self.w: C = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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