class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: H = None
        self.t: B = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: H = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: H = None
        self.t: B = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: H = None
        self.txt = txt

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

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