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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: B = None
        self.u: A = None
        self.z: F = None
        self.p: F = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: A = None
        self.x: H = None
        self.w: A = None
        self.v: G = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: B = None
        self.u: A = None
        self.z: F = None
        self.p: F = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: A = None
        self.x: H = None
        self.w: A = None
        self.v: G = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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