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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: H = None
        self.z: A = None
        self.y: B = None
        self.v: C = None
        self.u: G = None
        self.q: C = None
        self.o: A = None
        self.w: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: F = None
        self.r: G = None
        self.z: I = None
        self.t: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: H = None
        self.z: A = None
        self.y: B = None
        self.v: C = None
        self.u: G = None
        self.q: C = None
        self.o: A = None
        self.w: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: F = None
        self.r: G = None
        self.z: I = None
        self.t: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: C = None
        self.txt = txt

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

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