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

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

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

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

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

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

i.o = e
i.y = h
i.x = l
h.o = d
h.y = d
h.t = d
h.z = i
j.p = h
d.s = k
d.v = n
d.o = i
d.y = i
n.t = h
k.s = e
k.v = n
k.o = i
k.y = i
c.p = h
e.s = k
e.v = n
e.o = i
e.y = i
l.o = k
l.y = k
l.t = d
l.z = i
m.p = l
assert j.p.z.o.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: B = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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

i.o = e
i.y = h
i.x = l
h.o = d
h.y = d
h.t = d
h.z = i
j.p = h
d.s = k
d.v = n
d.o = i
d.y = i
n.t = h
k.s = e
k.v = n
k.o = i
k.y = i
c.p = h
e.s = k
e.v = n
e.o = i
e.y = i
l.o = k
l.y = k
l.t = d
l.z = i
m.p = l
assert j.p.z.o.s.y.txt == "i"