class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: E = None
        self.v: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: B = None
        self.v: B = None
        self.t: F = None
        self.p: C = None
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: D = None
        self.t: E = None
        self.s: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: B = None
        self.v: B = None
        self.t: F = None
        self.p: C = None
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: D = None
        self.t: E = None
        self.s: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: E = None
        self.txt = txt

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

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