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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: G = None
        self.z: E = None
        self.t: G = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: G = None
        self.q: B = None
        self.p: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: B = None
        self.q: D = None
        self.x: C = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: D = None
        self.t: C = None
        self.r: F = None
        self.o: C = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: C = None
        self.txt = txt

n = A("n")
d = B("d")
k = C("k")
l = D("l")
i = E("i")
e = F("e")
c = G("c")
f = H("f")
h = A("h")

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: G = None
        self.z: E = None
        self.t: G = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: G = None
        self.q: B = None
        self.p: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: B = None
        self.q: D = None
        self.x: C = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: D = None
        self.t: C = None
        self.r: F = None
        self.o: C = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: C = None
        self.txt = txt

n = A("n")
d = B("d")
k = C("k")
l = D("l")
i = E("i")
e = F("e")
c = G("c")
f = H("f")
h = A("h")

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