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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: B = None
        self.z: D = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: B = None
        self.z: D = None
        self.u: B = None
        self.txt = txt

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

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

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

m.o = e
m.w = e
m.p = i
m.s = g
m.x = c
j.y = k
i.w = e
i.r = j
i.z = h
i.u = g
h.w = c
h.y = e
h.x = e
h.u = i
h.z = b
c.u = i
c.q = m
b.o = m
b.w = m
b.p = i
b.s = g
b.x = c
k.y = g
l.w = c
l.y = b
l.u = i
l.x = e
l.z = m
g.y = j
e.o = b
e.w = m
e.p = i
e.s = j
e.x = c
assert k.y.y.y.y.y.y.txt == "k"