class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: A = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: D = None
        self.o: F = None
        self.x: C = None
        self.y: I = None
        self.w: G = None
        self.v: G = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: C = None
        self.v: A = None
        self.t: I = None
        self.p: F = None
        self.z: F = None
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: A = None
        self.x: D = None
        self.s: I = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: D = None
        self.o: F = None
        self.x: C = None
        self.y: I = None
        self.w: G = None
        self.v: G = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: C = None
        self.v: A = None
        self.t: I = None
        self.p: F = None
        self.z: F = None
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: A = None
        self.x: D = None
        self.s: I = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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