class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: I = None
        self.v: E = None
        self.u: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: I = None
        self.p: I = None
        self.w: B = None
        self.z: G = None
        self.t: I = None
        self.r: C = None
        self.y: C = None
        self.u: J = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: H = None
        self.s: E = None
        self.z: B = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.p: I = None
        self.v: I = None
        self.o: E = None
        self.w: C = None
        self.u: E = None
        self.t: D = None
        self.r: C = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: G = None
        self.s: G = None
        self.u: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: I = None
        self.p: I = None
        self.w: B = None
        self.z: G = None
        self.t: I = None
        self.r: C = None
        self.y: C = None
        self.u: J = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: H = None
        self.s: E = None
        self.z: B = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.p: I = None
        self.v: I = None
        self.o: E = None
        self.w: C = None
        self.u: E = None
        self.t: D = None
        self.r: C = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: G = None
        self.s: G = None
        self.u: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: E = None
        self.txt = txt

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

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