class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: B = None
        self.y: B = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: A = None
        self.r: E = None
        self.p: H = None
        self.y: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: B = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.r: B = None
        self.y: B = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: A = None
        self.r: E = None
        self.p: H = None
        self.y: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: B = None
        self.v: F = None
        self.txt = txt

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

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

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

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