class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: B = None
        self.y: B = None
        self.o: B = None
        self.txt = txt

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

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

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

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

m = A("m")
i = B("i")
b = C("b")
c = D("c")
n = E("n")
j = C("j")
f = E("f")
d = E("d")
k = B("k")
a = E("a")

m.p = c
m.x = i
m.y = k
m.o = k
i.x = b
i.q = b
i.p = m
i.u = m
i.s = j
b.u = f
b.t = k
c.w = d
c.p = j
c.o = j
c.t = f
n.v = m
n.s = i
j.u = f
j.t = i
f.v = m
f.s = i
d.v = m
d.s = i
k.x = j
k.p = m
k.u = m
k.s = b
k.q = b
a.v = m
a.s = k
assert i.q.u.v.p.w.v.o.u.x.txt == "
class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: B = None
        self.y: B = None
        self.o: B = None
        self.txt = txt

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

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

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

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

m = A("m")
i = B("i")
b = C("b")
c = D("c")
n = E("n")
j = C("j")
f = E("f")
d = E("d")
k = B("k")
a = E("a")

m.p = c
m.x = i
m.y = k
m.o = k
i.x = b
i.q = b
i.p = m
i.u = m
i.s = j
b.u = f
b.t = k
c.w = d
c.p = j
c.o = j
c.t = f
n.v = m
n.s = i
j.u = f
j.t = i
f.v = m
f.s = i
d.v = m
d.s = i
k.x = j
k.p = m
k.u = m
k.s = b
k.q = b
a.v = m
a.s = k
assert i.q.u.v.p.w.v.o.u.x.txt == "i"