class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: B = None
        self.w: C = None
        self.x: I = None
        self.y: J = None
        self.p: B = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: D = None
        self.z: F = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: A = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: C = None
        self.r: J = None
        self.x: I = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: E = None
        self.o: J = None
        self.t: C = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: B = None
        self.z: A = None
        self.x: C = None
        self.w: C = None
        self.q: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: B = None
        self.r: A = None
        self.u: A = None
        self.v: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: D = None
        self.z: F = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: A = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: C = None
        self.r: J = None
        self.x: I = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: E = None
        self.o: J = None
        self.t: C = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: B = None
        self.z: A = None
        self.x: C = None
        self.w: C = None
        self.q: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: B = None
        self.r: A = None
        self.u: A = None
        self.v: G = None
        self.txt = txt

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

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