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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: E = None
        self.p: B = None
        self.r: A = None
        self.x: E = None
        self.w: I = None
        self.y: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: H = None
        self.x: E = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: E = None
        self.s: E = None
        self.v: I = None
        self.r: G = None
        self.p: A = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: G = None
        self.v: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: E = None
        self.p: B = None
        self.r: A = None
        self.x: E = None
        self.w: I = None
        self.y: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: H = None
        self.x: E = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: E = None
        self.s: E = None
        self.v: I = None
        self.r: G = None
        self.p: A = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: G = None
        self.v: B = None
        self.txt = txt

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

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