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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: F = None
        self.t: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.y: C = None
        self.s: J = None
        self.o: B = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: A = None
        self.r: H = None
        self.p: I = None
        self.q: A = None
        self.w: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: I = None
        self.w: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: E = None
        self.y: E = None
        self.w: H = None
        self.r: B = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: F = None
        self.t: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: J = None
        self.y: C = None
        self.s: J = None
        self.o: B = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: A = None
        self.r: H = None
        self.p: I = None
        self.q: A = None
        self.w: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.v: I = None
        self.w: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: E = None
        self.y: E = None
        self.w: H = None
        self.r: B = None
        self.u: E = None
        self.txt = txt

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

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

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