class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: J = None
        self.w: D = None
        self.s: D = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: H = None
        self.y: G = None
        self.q: E = None
        self.t: J = None
        self.o: J = None
        self.v: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.p: D = None
        self.s: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.t: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: H = None
        self.y: G = None
        self.q: E = None
        self.t: J = None
        self.o: J = None
        self.v: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.p: D = None
        self.s: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.t: D = None
        self.txt = txt

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

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

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