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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: G = None
        self.p: F = None
        self.v: D = None
        self.r: D = None
        self.w: D = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: F = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: G = None
        self.p: F = None
        self.v: D = None
        self.r: D = None
        self.w: D = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: F = None
        self.s: G = None
        self.txt = txt

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

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

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