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

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

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

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

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

i = A("i")
l = B("l")
m = C("m")
c = D("c")
a = E("a")
h = D("h")
k = B("k")
b = C("b")

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

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

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

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

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

i = A("i")
l = B("l")
m = C("m")
c = D("c")
a = E("a")
h = D("h")
k = B("k")
b = C("b")

i.w = l
i.t = m
i.u = c
i.s = h
i.o = a
l.v = m
l.r = k
l.t = b
l.o = i
l.y = i
m.o = b
m.q = l
m.r = i
c.o = a
a.r = b
a.p = c
a.q = k
a.y = k
a.t = m
h.o = a
k.v = m
k.r = l
k.t = b
k.o = i
k.y = i
b.o = m
b.q = k
b.r = i
assert i.w.o.t.r.s.o.r.q.txt == "k"