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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: D = None
        self.x: D = None
        self.o: A = None
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: F = None
        self.q: C = None
        self.x: F = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: B = None
        self.txt = txt

a = A("a")
n = B("n")
m = C("m")
h = D("h")
c = E("c")
e = F("e")
f = E("f")
i = C("i")
d = D("d")

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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: D = None
        self.x: D = None
        self.o: A = None
        self.s: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: F = None
        self.q: C = None
        self.x: F = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: B = None
        self.txt = txt

a = A("a")
n = B("n")
m = C("m")
h = D("h")
c = E("c")
e = F("e")
f = E("f")
i = C("i")
d = D("d")

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