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

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

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

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

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

k = A("k")
a = B("a")
c = C("c")
b = D("b")
j = E("j")
n = B("n")
f = C("f")
h = A("h")

k.w = j
k.x = c
k.s = c
k.y = f
a.s = c
a.x = c
a.w = k
a.o = n
c.y = j
c.o = f
c.t = n
b.w = n
b.z = j
b.v = a
j.q = h
j.v = a
j.r = a
j.u = k
j.s = c
n.s = f
n.x = c
n.w = k
n.o = a
f.y = j
f.o = c
f.t = a
h.w = j
h.x = c
h.y = c
h.s = c
assert c.y.u.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: C = None
        self.y: C = None
        self.s: C = None
        self.txt = txt

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

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

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

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

k = A("k")
a = B("a")
c = C("c")
b = D("b")
j = E("j")
n = B("n")
f = C("f")
h = A("h")

k.w = j
k.x = c
k.s = c
k.y = f
a.s = c
a.x = c
a.w = k
a.o = n
c.y = j
c.o = f
c.t = n
b.w = n
b.z = j
b.v = a
j.q = h
j.v = a
j.r = a
j.u = k
j.s = c
n.s = f
n.x = c
n.w = k
n.o = a
f.y = j
f.o = c
f.t = a
h.w = j
h.x = c
h.y = c
h.s = c
assert c.y.u.w.u.txt == "k"