class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: B = None
        self.y: I = None
        self.w: B = None
        self.v: D = None
        self.x: F = None
        self.t: C = None
        self.r: G = None
        self.z: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: D = None
        self.u: H = None
        self.z: I = None
        self.x: I = None
        self.p: E = None
        self.t: H = None
        self.v: F = None
        self.r: I = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: C = None
        self.u: J = None
        self.r: A = None
        self.s: G = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: G = None
        self.x: B = None
        self.u: F = None
        self.v: G = None
        self.o: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: D = None
        self.u: H = None
        self.z: I = None
        self.x: I = None
        self.p: E = None
        self.t: H = None
        self.v: F = None
        self.r: I = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: C = None
        self.u: J = None
        self.r: A = None
        self.s: G = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: G = None
        self.x: B = None
        self.u: F = None
        self.v: G = None
        self.o: D = None
        self.txt = txt

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

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

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