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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: H = None
        self.p: F = None
        self.x: C = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: B = None
        self.t: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: F = None
        self.p: D = None
        self.y: H = None
        self.q: A = None
        self.o: F = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: H = None
        self.s: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: D = None
        self.r: E = None
        self.s: D = None
        self.w: I = None
        self.q: I = None
        self.o: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: H = None
        self.p: F = None
        self.x: C = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: B = None
        self.t: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: F = None
        self.p: D = None
        self.y: H = None
        self.q: A = None
        self.o: F = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: H = None
        self.s: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: D = None
        self.r: E = None
        self.s: D = None
        self.w: I = None
        self.q: I = None
        self.o: G = None
        self.txt = txt

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

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

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