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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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