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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: A = None
        self.q: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: G = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: A = None
        self.y: A = None
        self.q: A = None
        self.txt = txt

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

k = A("k")
b = B("b")
n = C("n")
e = D("e")
h = E("h")
j = F("j")
f = G("f")
a = H("a")
i = B("i")

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: A = None
        self.q: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: G = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: A = None
        self.y: A = None
        self.q: A = None
        self.txt = txt

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

k = A("k")
b = B("b")
n = C("n")
e = D("e")
h = E("h")
j = F("j")
f = G("f")
a = H("a")
i = B("i")

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