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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: H = None
        self.t: C = None
        self.u: A = None
        self.o: E = None
        self.z: A = None
        self.y: C = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: H = None
        self.q: D = None
        self.t: A = None
        self.s: D = None
        self.y: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: H = None
        self.w: E = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: H = None
        self.t: C = None
        self.u: A = None
        self.o: E = None
        self.z: A = None
        self.y: C = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: H = None
        self.q: D = None
        self.t: A = None
        self.s: D = None
        self.y: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: H = None
        self.w: E = None
        self.p: G = None
        self.txt = txt

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

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

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

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

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

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

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