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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: B = None
        self.t: D = None
        self.s: C = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: B = None
        self.t: D = None
        self.s: C = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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