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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: A = None
        self.q: E = None
        self.p: C = None
        self.s: D = None
        self.t: G = None
        self.w: G = None
        self.y: B = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: A = None
        self.q: E = None
        self.p: C = None
        self.s: D = None
        self.t: G = None
        self.w: G = None
        self.y: B = None
        self.u: G = None
        self.txt = txt

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

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

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

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