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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: I = None
        self.o: B = None
        self.x: H = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: I = None
        self.o: B = None
        self.x: H = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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