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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: I = None
        self.w: H = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: G = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: B = None
        self.u: D = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: C = None
        self.y: D = None
        self.t: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: F = None
        self.z: E = None
        self.t: D = None
        self.v: A = None
        self.w: C = None
        self.q: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: I = None
        self.w: H = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: G = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: B = None
        self.u: D = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: C = None
        self.y: D = None
        self.t: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: F = None
        self.z: E = None
        self.t: D = None
        self.v: A = None
        self.w: C = None
        self.q: D = None
        self.txt = txt

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

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