class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: B = None
        self.p: E = None
        self.v: B = None
        self.x: B = None
        self.o: E = None
        self.r: H = None
        self.w: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: B = None
        self.y: B = None
        self.q: F = None
        self.v: F = None
        self.z: H = None
        self.r: H = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: A = None
        self.x: E = None
        self.w: F = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: B = None
        self.y: B = None
        self.q: F = None
        self.v: F = None
        self.z: H = None
        self.r: H = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: A = None
        self.x: E = None
        self.w: F = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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

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