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

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: E = None
        self.r: D = None
        self.v: D = None
        self.z: C = None
        self.txt = txt

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

m = A("m")
e = B("e")
h = C("h")
l = D("l")
i = E("i")
a = D("a")
f = B("f")
j = E("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: E = None
        self.r: D = None
        self.v: D = None
        self.z: C = None
        self.txt = txt

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

m = A("m")
e = B("e")
h = C("h")
l = D("l")
i = E("i")
a = D("a")
f = B("f")
j = E("j")

m.t = h
m.w = l
e.w = f
e.q = j
e.o = m
e.s = m
e.x = a
h.u = m
h.r = f
h.s = f
h.v = i
l.y = m
l.u = i
l.r = a
l.v = a
l.z = h
i.q = j
i.v = h
i.u = h
i.s = l
a.y = m
a.u = i
a.r = l
a.v = l
a.z = h
f.w = e
f.q = j
f.o = m
f.s = m
f.x = l
j.q = i
j.v = h
j.u = h
j.s = l
assert e.s.w.r.txt == "a"