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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: A = None
        self.u: C = None
        self.o: B = None
        self.z: C = None
        self.x: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: D = None
        self.u: G = None
        self.t: G = None
        self.v: B = None
        self.r: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: A = None
        self.u: C = None
        self.o: B = None
        self.z: C = None
        self.x: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: D = None
        self.u: G = None
        self.t: G = None
        self.v: B = None
        self.r: F = None
        self.txt = txt

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

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

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

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