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

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

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

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

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

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

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

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

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

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

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

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

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

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

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