class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: C = None
        self.x: B = None
        self.o: H = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: D = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: C = None
        self.x: G = None
        self.p: C = None
        self.y: E = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: A = None
        self.x: D = None
        self.q: C = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: D = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: C = None
        self.x: G = None
        self.p: C = None
        self.y: E = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: A = None
        self.x: D = None
        self.q: C = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: E = None
        self.txt = txt

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

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