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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: B = None
        self.x: H = None
        self.v: D = None
        self.o: H = None
        self.z: G = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: A = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: B = None
        self.x: H = None
        self.v: D = None
        self.o: H = None
        self.z: G = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: A = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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