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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: C = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: H = None
        self.o: B = None
        self.r: G = None
        self.q: H = None
        self.t: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: G = None
        self.y: D = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: D = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: A = None
        self.r: A = None
        self.u: A = None
        self.y: F = None
        self.p: D = None
        self.o: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: C = None
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: H = None
        self.o: B = None
        self.r: G = None
        self.q: H = None
        self.t: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: G = None
        self.y: D = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: D = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: A = None
        self.r: A = None
        self.u: A = None
        self.y: F = None
        self.p: D = None
        self.o: E = None
        self.txt = txt

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

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

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