class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: J = None
        self.o: D = None
        self.s: E = None
        self.w: E = None
        self.p: D = None
        self.t: G = None
        self.r: G = None
        self.q: E = None
        self.u: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: B = None
        self.y: H = None
        self.t: A = None
        self.r: E = None
        self.o: F = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: D = None
        self.x: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: F = None
        self.u: B = None
        self.s: I = None
        self.y: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: J = None
        self.o: D = None
        self.s: E = None
        self.w: E = None
        self.p: D = None
        self.t: G = None
        self.r: G = None
        self.q: E = None
        self.u: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: B = None
        self.y: H = None
        self.t: A = None
        self.r: E = None
        self.o: F = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: D = None
        self.x: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: F = None
        self.u: B = None
        self.s: I = None
        self.y: D = None
        self.txt = txt

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

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