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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: H = None
        self.r: B = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: A = None
        self.u: D = None
        self.q: D = None
        self.w: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

h = A("h")
e = B("e")
j = C("j")
l = D("l")
c = E("c")
d = F("d")
a = G("a")
m = H("m")
n = I("n")
k = H("k")

h.t = l
h.w = c
e.u = k
j.t = n
j.s = h
j.q = l
j.o = l
j.v = l
j.x = e
j.z = e
j.u = a
j.r = c
l.p = k
l.u = k
l.r = e
l.t = c
c.q = l
d.y = j
d.t = h
d.w = h
d.u = l
d.q = l
a.s = n
a.z = e
m.y = e
n.t = k
n.q = d
n.y = h
n.v = c
k.y = e
assert c.q.t.q.u.y.u.y.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: H = None
        self.r: B = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: A = None
        self.u: D = None
        self.q: D = None
        self.w: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

h = A("h")
e = B("e")
j = C("j")
l = D("l")
c = E("c")
d = F("d")
a = G("a")
m = H("m")
n = I("n")
k = H("k")

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