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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: C = None
        self.q: C = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: B = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

i.z = e
i.o = n
i.v = c
a.z = i
a.s = j
a.q = j
a.u = n
j.u = a
l.v = e
l.u = a
h.q = c
h.o = a
h.r = l
g.v = i
c.w = n
c.q = h
n.s = a
e.o = l
e.q = h
assert i.z.q.o.z.z.q.o.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.o: H = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: C = None
        self.q: C = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: B = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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