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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: H = None
        self.o: A = None
        self.t: H = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: D = None
        self.o: G = None
        self.t: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: B = None
        self.q: H = None
        self.u: H = None
        self.s: F = None
        self.t: I = None
        self.r: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: H = None
        self.o: A = None
        self.t: H = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: D = None
        self.o: G = None
        self.t: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: B = None
        self.q: H = None
        self.u: H = None
        self.s: F = None
        self.t: I = None
        self.r: F = None
        self.txt = txt

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

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