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

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

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

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

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

m = A("m")
e = B("e")
h = C("h")
g = D("g")
n = E("n")
d = A("d")
b = B("b")
i = A("i")
f = D("f")

m.w = f
m.y = f
m.o = b
m.z = n
e.s = h
e.y = f
e.u = f
e.v = i
e.x = n
h.t = b
h.z = n
h.x = f
g.p = e
g.w = n
g.o = m
n.w = g
n.t = g
d.w = g
d.y = f
d.o = b
d.z = n
b.s = h
b.y = f
b.u = f
b.v = d
b.x = n
i.w = f
i.y = g
i.o = b
i.z = n
f.p = e
f.w = n
f.o = m
assert h.x.p.x.t.o.o.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: D = None
        self.o: B = None
        self.z: E = None
        self.txt = txt

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

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

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

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

m = A("m")
e = B("e")
h = C("h")
g = D("g")
n = E("n")
d = A("d")
b = B("b")
i = A("i")
f = D("f")

m.w = f
m.y = f
m.o = b
m.z = n
e.s = h
e.y = f
e.u = f
e.v = i
e.x = n
h.t = b
h.z = n
h.x = f
g.p = e
g.w = n
g.o = m
n.w = g
n.t = g
d.w = g
d.y = f
d.o = b
d.z = n
b.s = h
b.y = f
b.u = f
b.v = d
b.x = n
i.w = f
i.y = g
i.o = b
i.z = n
f.p = e
f.w = n
f.o = m
assert h.x.p.x.t.o.o.u.o.txt == "m"