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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.o: B = None
        self.y: A = None
        self.txt = txt

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

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

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

a = A("a")
c = B("c")
i = C("i")
g = D("g")
j = E("j")
b = F("b")
l = E("l")
h = C("h")

a.q = j
c.y = b
i.t = a
i.y = a
i.v = g
i.o = c
g.z = l
j.t = i
j.q = h
j.o = c
j.u = c
j.y = a
j.s = a
b.w = g
b.r = g
b.o = l
l.t = h
l.q = i
l.o = c
l.u = c
l.y = a
l.s = a
h.t = a
h.y = a
h.v = g
h.o = c
assert c.y.w.z.s.q.q.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.o: B = None
        self.y: A = None
        self.txt = txt

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

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

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

a = A("a")
c = B("c")
i = C("i")
g = D("g")
j = E("j")
b = F("b")
l = E("l")
h = C("h")

a.q = j
c.y = b
i.t = a
i.y = a
i.v = g
i.o = c
g.z = l
j.t = i
j.q = h
j.o = c
j.u = c
j.y = a
j.s = a
b.w = g
b.r = g
b.o = l
l.t = h
l.q = i
l.o = c
l.u = c
l.y = a
l.s = a
h.t = a
h.y = a
h.v = g
h.o = c
assert c.y.w.z.s.q.q.txt == "h"