class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: I = None
        self.x: I = None
        self.v: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: I = None
        self.s: J = None
        self.o: D = None
        self.x: I = None
        self.z: E = None
        self.p: E = None
        self.u: I = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.z: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.s: D = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: B = None
        self.y: I = None
        self.q: B = None
        self.u: C = None
        self.w: C = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: D = None
        self.p: E = None
        self.s: A = None
        self.txt = txt

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

j = A("j")
a = B("a")
i = C("i")
g = D("g")
d = E("d")
h = F("h")
l = G("l")
n = H("n")
m = I("m")
c = J("c")

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: I = None
        self.s: J = None
        self.o: D = None
        self.x: I = None
        self.z: E = None
        self.p: E = None
        self.u: I = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.z: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.s: D = None
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: B = None
        self.y: I = None
        self.q: B = None
        self.u: C = None
        self.w: C = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: D = None
        self.p: E = None
        self.s: A = None
        self.txt = txt

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

j = A("j")
a = B("a")
i = C("i")
g = D("g")
d = E("d")
h = F("h")
l = G("l")
n = H("n")
m = I("m")
c = J("c")

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