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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: E = None
        self.y: E = None
        self.txt = txt

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

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

i = A("i")
d = B("d")
h = C("h")
j = D("j")
n = E("n")
f = C("f")
l = B("l")

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: E = None
        self.y: E = None
        self.txt = txt

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

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

i = A("i")
d = B("d")
h = C("h")
j = D("j")
n = E("n")
f = C("f")
l = B("l")

i.w = h
i.o = j
i.t = l
d.p = i
d.o = i
d.v = n
h.p = n
h.v = n
h.y = n
j.t = l
j.x = h
j.z = n
n.z = j
n.u = j
n.s = i
f.p = n
f.v = n
f.y = n
l.p = i
l.o = i
l.v = n
assert h.p.u.x.txt == "h"