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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: A = None
        self.txt = txt

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

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

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

e = A("e")
b = B("b")
a = C("a")
m = D("m")
n = E("n")
h = D("h")
j = C("j")
f = E("f")

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: A = None
        self.txt = txt

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

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

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

e = A("e")
b = B("b")
a = C("a")
m = D("m")
n = E("n")
h = D("h")
j = C("j")
f = E("f")

e.x = j
e.y = n
e.v = f
e.p = b
b.y = h
b.u = e
a.p = e
a.y = h
a.w = h
a.o = b
a.s = b
m.u = e
m.s = e
m.z = e
n.x = j
n.o = e
h.u = e
h.s = e
h.z = e
j.p = e
j.y = m
j.w = m
j.o = b
j.s = b
f.x = j
f.o = e
assert j.s.y.u.txt == "e"