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

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: G = None
        self.r: A = None
        self.y: H = None
        self.s: G = None
        self.o: D = None
        self.t: D = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: J = None
        self.u: H = None
        self.x: B = None
        self.q: I = None
        self.v: A = None
        self.s: J = None
        self.p: F = None
        self.r: G = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: C = None
        self.t: H = None
        self.z: A = None
        self.q: E = None
        self.s: I = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: A = None
        self.u: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: B = None
        self.q: H = None
        self.u: B = None
        self.y: B = None
        self.z: J = None
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: E = None
        self.p: D = None
        self.q: C = None
        self.u: I = None
        self.o: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: G = None
        self.r: A = None
        self.y: H = None
        self.s: G = None
        self.o: D = None
        self.t: D = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: J = None
        self.u: H = None
        self.x: B = None
        self.q: I = None
        self.v: A = None
        self.s: J = None
        self.p: F = None
        self.r: G = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: C = None
        self.t: H = None
        self.z: A = None
        self.q: E = None
        self.s: I = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: A = None
        self.u: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: B = None
        self.q: H = None
        self.u: B = None
        self.y: B = None
        self.z: J = None
        self.o: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: E = None
        self.p: D = None
        self.q: C = None
        self.u: I = None
        self.o: I = None
        self.txt = txt

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

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