class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: C = None
        self.q: B = None
        self.u: I = None
        self.x: D = None
        self.t: I = None
        self.s: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: A = None
        self.w: H = None
        self.u: H = None
        self.v: F = None
        self.s: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: A = None
        self.w: H = None
        self.u: H = None
        self.v: F = None
        self.s: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

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