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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: A = None
        self.txt = txt

c = A("c")
e = B("e")
l = C("l")
k = D("k")
d = E("d")
h = F("h")
g = A("g")
b = B("b")
a = F("a")
n = C("n")

c.q = d
c.o = a
c.s = g
c.z = g
e.o = b
e.y = d
l.r = k
l.q = k
k.u = n
k.q = d
k.z = d
k.y = g
k.t = e
d.v = k
d.p = n
h.y = k
h.v = g
g.q = d
g.o = a
g.s = c
g.z = c
b.o = e
b.y = d
a.y = k
a.v = c
n.r = k
n.q = k
assert d.p.q.y.o.y.u.q.z.v.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: F = None
        self.s: A = None
        self.z: A = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: A = None
        self.txt = txt

c = A("c")
e = B("e")
l = C("l")
k = D("k")
d = E("d")
h = F("h")
g = A("g")
b = B("b")
a = F("a")
n = C("n")

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