class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: G = None
        self.t: I = None
        self.w: I = None
        self.o: G = None
        self.s: D = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: E = None
        self.q: D = None
        self.s: G = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: A = None
        self.s: G = None
        self.q: H = None
        self.t: H = None
        self.x: G = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: H = None
        self.p: E = None
        self.s: A = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: C = None
        self.txt = txt

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

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

a.v = h
j.u = e
j.s = e
j.r = g
j.o = g
j.t = i
j.w = i
j.v = i
h.o = l
h.v = c
h.q = e
h.s = g
h.p = j
e.x = c
e.u = j
c.r = h
c.y = a
c.v = a
c.s = g
c.x = g
c.q = l
c.t = l
n.r = i
n.t = j
g.w = n
g.o = l
g.p = c
g.s = a
g.r = e
l.x = j
l.q = h
i.q = c
i.y = c
i.s = l
i.x = j
i.r = a
i.w = h
assert i.s.x.u.u.s.x.x.w.r.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: G = None
        self.t: I = None
        self.w: I = None
        self.o: G = None
        self.s: D = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: E = None
        self.q: D = None
        self.s: G = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: A = None
        self.s: G = None
        self.q: H = None
        self.t: H = None
        self.x: G = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: H = None
        self.p: E = None
        self.s: A = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: C = None
        self.txt = txt

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

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

a.v = h
j.u = e
j.s = e
j.r = g
j.o = g
j.t = i
j.w = i
j.v = i
h.o = l
h.v = c
h.q = e
h.s = g
h.p = j
e.x = c
e.u = j
c.r = h
c.y = a
c.v = a
c.s = g
c.x = g
c.q = l
c.t = l
n.r = i
n.t = j
g.w = n
g.o = l
g.p = c
g.s = a
g.r = e
l.x = j
l.q = h
i.q = c
i.y = c
i.s = l
i.x = j
i.r = a
i.w = h
assert i.s.x.u.u.s.x.x.w.r.txt == "i"