class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: G = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: G = None
        self.w: F = None
        self.z: I = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: A = None
        self.w: E = None
        self.z: G = None
        self.r: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: G = None
        self.w: F = None
        self.z: I = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: A = None
        self.w: E = None
        self.z: G = None
        self.r: J = None
        self.txt = txt

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

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

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