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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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

j = A("j")
h = B("h")
c = C("c")
m = D("m")
f = E("f")
e = C("e")
i = E("i")
b = B("b")

j.w = f
j.o = f
j.u = b
j.s = e
j.x = m
h.w = c
h.y = c
h.v = c
c.q = b
m.t = e
m.r = j
m.v = j
m.y = h
m.p = b
f.t = m
f.s = i
e.q = h
i.t = m
i.s = f
b.w = e
b.y = c
b.v = c
assert e.q.v.q.w.q.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.u: B = None
        self.o: E = None
        self.s: C = None
        self.x: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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

j = A("j")
h = B("h")
c = C("c")
m = D("m")
f = E("f")
e = C("e")
i = E("i")
b = B("b")

j.w = f
j.o = f
j.u = b
j.s = e
j.x = m
h.w = c
h.y = c
h.v = c
c.q = b
m.t = e
m.r = j
m.v = j
m.y = h
m.p = b
f.t = m
f.s = i
e.q = h
i.t = m
i.s = f
b.w = e
b.y = c
b.v = c
assert e.q.v.q.w.q.w.txt == "c"