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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: B = None
        self.r: C = None
        self.v: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: B = None
        self.s: F = None
        self.p: F = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: C = None
        self.v: C = None
        self.txt = txt

f = A("f")
e = B("e")
j = C("j")
n = D("n")
k = E("k")
a = F("a")
d = C("d")
i = B("i")
m = A("m")
l = D("l")

f.x = k
f.p = m
f.z = n
f.v = j
e.p = d
e.o = n
e.r = l
e.x = k
j.s = a
j.o = e
j.r = d
j.v = d
n.z = l
n.x = i
n.s = a
n.p = a
n.y = e
k.p = e
a.o = l
a.s = j
a.v = d
d.s = a
d.o = i
d.r = j
d.v = j
i.p = j
i.o = n
i.r = l
i.x = k
m.x = k
m.p = f
m.z = n
m.v = d
l.z = n
l.x = i
l.y = i
l.s = a
l.p = a
assert m.z.x.x.p.o.y.x.p.r.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: A = None
        self.z: D = None
        self.v: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: B = None
        self.r: C = None
        self.v: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: B = None
        self.s: F = None
        self.p: F = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: C = None
        self.v: C = None
        self.txt = txt

f = A("f")
e = B("e")
j = C("j")
n = D("n")
k = E("k")
a = F("a")
d = C("d")
i = B("i")
m = A("m")
l = D("l")

f.x = k
f.p = m
f.z = n
f.v = j
e.p = d
e.o = n
e.r = l
e.x = k
j.s = a
j.o = e
j.r = d
j.v = d
n.z = l
n.x = i
n.s = a
n.p = a
n.y = e
k.p = e
a.o = l
a.s = j
a.v = d
d.s = a
d.o = i
d.r = j
d.v = j
i.p = j
i.o = n
i.r = l
i.x = k
m.x = k
m.p = f
m.z = n
m.v = d
l.z = n
l.x = i
l.y = i
l.s = a
l.p = a
assert m.z.x.x.p.o.y.x.p.r.txt == "l"