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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: E = None
        self.q: A = None
        self.o: F = None
        self.w: B = None
        self.r: C = None
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: H = None
        self.u: A = None
        self.v: A = None
        self.q: F = None
        self.y: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: F = None
        self.y: C = None
        self.w: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: B = None
        self.t: C = None
        self.p: G = None
        self.z: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: E = None
        self.q: A = None
        self.o: F = None
        self.w: B = None
        self.r: C = None
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: H = None
        self.u: A = None
        self.v: A = None
        self.q: F = None
        self.y: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: F = None
        self.y: C = None
        self.w: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: B = None
        self.t: C = None
        self.p: G = None
        self.z: F = None
        self.txt = txt

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

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