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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

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

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

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