class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: B = None
        self.p: E = None
        self.z: H = None
        self.x: H = None
        self.q: H = None
        self.u: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: G = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: I = None
        self.t: D = None
        self.p: C = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: B = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: G = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: I = None
        self.t: D = None
        self.p: C = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: B = None
        self.v: F = None
        self.txt = txt

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

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