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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: H = None
        self.y: I = None
        self.x: A = None
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: F = None
        self.v: G = None
        self.w: C = None
        self.u: F = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: A = None
        self.q: H = None
        self.u: H = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.r: H = None
        self.y: I = None
        self.x: A = None
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: F = None
        self.v: G = None
        self.w: C = None
        self.u: F = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: A = None
        self.q: H = None
        self.u: H = None
        self.txt = txt

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

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

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

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

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