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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: G = None
        self.v: A = None
        self.w: C = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: H = None
        self.x: E = None
        self.w: A = None
        self.t: C = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: G = None
        self.v: A = None
        self.w: C = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: H = None
        self.x: E = None
        self.w: A = None
        self.t: C = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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