class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: J = None
        self.r: F = None
        self.t: H = None
        self.s: J = None
        self.z: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: E = None
        self.w: H = None
        self.s: I = None
        self.v: B = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: B = None
        self.q: F = None
        self.t: G = None
        self.o: B = None
        self.z: B = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: J = None
        self.v: J = None
        self.x: E = None
        self.r: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: E = None
        self.w: H = None
        self.s: I = None
        self.v: B = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: B = None
        self.q: F = None
        self.t: G = None
        self.o: B = None
        self.z: B = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: J = None
        self.v: J = None
        self.x: E = None
        self.r: A = None
        self.txt = txt

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

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

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

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