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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: F = None
        self.p: C = None
        self.r: F = None
        self.txt = txt

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

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

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

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

n = A("n")
i = B("i")
e = C("e")
f = D("f")
a = E("a")
l = F("l")
m = A("m")

n.u = a
n.r = m
n.y = m
n.v = m
n.z = i
n.p = e
i.q = e
i.p = e
i.u = l
i.r = l
e.z = l
e.v = l
e.t = n
e.y = n
e.o = f
e.p = i
f.y = a
f.v = a
f.t = n
a.v = e
a.z = l
a.o = n
a.r = m
a.x = i
l.y = m
l.s = i
l.z = i
l.o = f
l.x = f
l.w = a
m.u = a
m.r = n
m.y = n
m.v = n
m.z = i
m.p = e
assert n.y.z.q.z.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: A = None
        self.z: B = None
        self.y: A = None
        self.v: A = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: F = None
        self.p: C = None
        self.r: F = None
        self.txt = txt

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

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

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

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

n = A("n")
i = B("i")
e = C("e")
f = D("f")
a = E("a")
l = F("l")
m = A("m")

n.u = a
n.r = m
n.y = m
n.v = m
n.z = i
n.p = e
i.q = e
i.p = e
i.u = l
i.r = l
e.z = l
e.v = l
e.t = n
e.y = n
e.o = f
e.p = i
f.y = a
f.v = a
f.t = n
a.v = e
a.z = l
a.o = n
a.r = m
a.x = i
l.y = m
l.s = i
l.z = i
l.o = f
l.x = f
l.w = a
m.u = a
m.r = n
m.y = n
m.v = n
m.z = i
m.p = e
assert n.y.z.q.z.txt == "l"