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

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

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

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

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

l = A("l")
m = B("m")
j = C("j")
c = D("c")
h = E("h")
d = B("d")
i = C("i")
n = B("n")
a = D("a")

l.x = h
l.u = d
l.p = j
m.y = c
m.r = n
m.w = l
m.u = l
m.x = d
j.o = c
j.r = h
j.t = h
j.p = d
c.o = i
c.q = n
c.p = n
h.z = c
h.q = c
h.y = i
h.v = l
d.y = c
d.r = m
d.x = m
d.w = l
d.u = l
i.o = a
i.r = h
i.t = h
i.p = m
n.y = a
n.r = d
n.x = d
n.w = l
n.u = l
a.o = j
a.q = n
a.p = m
assert c.o.t.v.x.y.r.q.o.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: B = None
        self.p: C = None
        self.txt = txt

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

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

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

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

l = A("l")
m = B("m")
j = C("j")
c = D("c")
h = E("h")
d = B("d")
i = C("i")
n = B("n")
a = D("a")

l.x = h
l.u = d
l.p = j
m.y = c
m.r = n
m.w = l
m.u = l
m.x = d
j.o = c
j.r = h
j.t = h
j.p = d
c.o = i
c.q = n
c.p = n
h.z = c
h.q = c
h.y = i
h.v = l
d.y = c
d.r = m
d.x = m
d.w = l
d.u = l
i.o = a
i.r = h
i.t = h
i.p = m
n.y = a
n.r = d
n.x = d
n.w = l
n.u = l
a.o = j
a.q = n
a.p = m
assert c.o.t.v.x.y.r.q.o.txt == "i"