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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: B = None
        self.u: A = None
        self.t: E = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: B = None
        self.u: A = None
        self.t: E = None
        self.w: B = None
        self.txt = txt

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

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

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