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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: C = None
        self.u: E = None
        self.z: A = None
        self.txt = txt

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

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

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

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

d.u = a
d.z = k
m.o = k
e.v = d
e.z = d
e.t = c
e.u = n
g.x = k
g.y = a
g.w = m
i.s = d
i.t = m
k.s = m
k.o = i
k.z = d
k.v = d
n.s = d
n.t = m
c.v = d
c.z = d
c.t = e
c.u = i
a.x = k
a.y = g
a.w = m
assert e.v.z.z.z.s.o.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: C = None
        self.u: E = None
        self.z: A = None
        self.txt = txt

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

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

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

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

d.u = a
d.z = k
m.o = k
e.v = d
e.z = d
e.t = c
e.u = n
g.x = k
g.y = a
g.w = m
i.s = d
i.t = m
k.s = m
k.o = i
k.z = d
k.v = d
n.s = d
n.t = m
c.v = d
c.z = d
c.t = e
c.u = i
a.x = k
a.y = g
a.w = m
assert e.v.z.z.z.s.o.txt == "k"