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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: F = None
        self.u: D = None
        self.z: E = None
        self.q: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: F = None
        self.u: D = None
        self.z: E = None
        self.q: C = None
        self.txt = txt

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

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