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

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: B = None
        self.r: E = None
        self.u: F = None
        self.v: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: H = None
        self.v: A = None
        self.o: D = None
        self.x: E = None
        self.s: H = None
        self.txt = txt

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

h = A("h")
m = B("m")
b = C("b")
j = D("j")
n = E("n")
l = F("l")
c = G("c")
k = H("k")
d = H("d")
f = C("f")

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: B = None
        self.r: E = None
        self.u: F = None
        self.v: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: H = None
        self.v: A = None
        self.o: D = None
        self.x: E = None
        self.s: H = None
        self.txt = txt

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

h = A("h")
m = B("m")
b = C("b")
j = D("j")
n = E("n")
l = F("l")
c = G("c")
k = H("k")
d = H("d")
f = C("f")

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