class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: D = None
        self.t: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: H = None
        self.u: H = None
        self.p: E = None
        self.v: B = None
        self.r: H = None
        self.s: E = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: J = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: A = None
        self.r: E = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: I = None
        self.s: C = None
        self.t: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.z: H = None
        self.u: H = None
        self.p: E = None
        self.v: B = None
        self.r: H = None
        self.s: E = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: J = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: A = None
        self.r: E = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: I = None
        self.s: C = None
        self.t: D = None
        self.txt = txt

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

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