class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: F = None
        self.o: H = None
        self.q: A = None
        self.s: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: G = None
        self.y: H = None
        self.t: G = None
        self.u: A = None
        self.w: I = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: A = None
        self.t: I = None
        self.p: C = None
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: A = None
        self.y: I = None
        self.x: F = None
        self.r: D = None
        self.s: C = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: A = None
        self.p: G = None
        self.v: A = None
        self.o: A = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: G = None
        self.p: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: G = None
        self.y: H = None
        self.t: G = None
        self.u: A = None
        self.w: I = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: A = None
        self.t: I = None
        self.p: C = None
        self.w: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: A = None
        self.y: I = None
        self.x: F = None
        self.r: D = None
        self.s: C = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: A = None
        self.p: G = None
        self.v: A = None
        self.o: A = None
        self.t: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: G = None
        self.p: A = None
        self.txt = txt

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

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