class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: I = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: E = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: D = None
        self.q: G = None
        self.s: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: E = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: D = None
        self.q: G = None
        self.s: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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