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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: E = None
        self.p: F = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

m.u = a
e.o = g
e.w = n
e.p = i
e.z = m
k.z = a
k.v = g
k.t = e
j.t = a
j.z = m
j.x = n
n.r = k
c.r = j
c.v = e
i.r = j
i.v = e
l.r = j
l.v = e
g.z = a
g.v = k
g.t = e
a.r = g
assert m.u.r.z.r.z.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: E = None
        self.p: F = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

m.u = a
e.o = g
e.w = n
e.p = i
e.z = m
k.z = a
k.v = g
k.t = e
j.t = a
j.z = m
j.x = n
n.r = k
c.r = j
c.v = e
i.r = j
i.v = e
l.r = j
l.v = e
g.z = a
g.v = k
g.t = e
a.r = g
assert m.u.r.z.r.z.txt == "a"