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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: A = None
        self.y: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: D = None
        self.s: B = None
        self.x: B = None
        self.u: A = None
        self.v: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: A = None
        self.y: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: D = None
        self.s: B = None
        self.x: B = None
        self.u: A = None
        self.v: C = None
        self.txt = txt

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

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