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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: F = None
        self.z: B = None
        self.y: B = None
        self.t: C = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: F = None
        self.t: A = None
        self.r: A = None
        self.w: C = None
        self.x: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: F = None
        self.z: B = None
        self.y: B = None
        self.t: C = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: F = None
        self.t: A = None
        self.r: A = None
        self.w: C = None
        self.x: C = None
        self.txt = txt

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

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

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