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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: E = None
        self.w: D = None
        self.u: B = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: A = None
        self.u: F = None
        self.r: F = None
        self.z: C = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: D = None
        self.p: C = None
        self.t: C = None
        self.o: A = None
        self.txt = txt

e = A("e")
g = B("g")
f = C("f")
n = D("n")
b = E("b")
l = F("l")
m = B("m")

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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: E = None
        self.w: D = None
        self.u: B = None
        self.z: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.q: A = None
        self.u: F = None
        self.r: F = None
        self.z: C = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: D = None
        self.p: C = None
        self.t: C = None
        self.o: A = None
        self.txt = txt

e = A("e")
g = B("g")
f = C("f")
n = D("n")
b = E("b")
l = F("l")
m = B("m")

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