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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: G = None
        self.y: F = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: H = None
        self.x: J = None
        self.q: F = None
        self.t: B = None
        self.s: A = None
        self.v: J = None
        self.w: H = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: A = None
        self.y: B = None
        self.t: A = None
        self.s: G = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: C = None
        self.z: A = None
        self.r: B = None
        self.v: D = None
        self.p: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: H = None
        self.s: B = None
        self.y: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: G = None
        self.s: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: G = None
        self.y: F = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: H = None
        self.x: J = None
        self.q: F = None
        self.t: B = None
        self.s: A = None
        self.v: J = None
        self.w: H = None
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: A = None
        self.y: B = None
        self.t: A = None
        self.s: G = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: C = None
        self.z: A = None
        self.r: B = None
        self.v: D = None
        self.p: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: H = None
        self.s: B = None
        self.y: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: G = None
        self.s: C = None
        self.txt = txt

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

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