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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: D = None
        self.v: H = None
        self.q: B = None
        self.w: C = None
        self.y: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: B = None
        self.y: E = None
        self.o: H = None
        self.s: C = None
        self.u: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: A = None
        self.o: C = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: G = None
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: D = None
        self.v: H = None
        self.q: B = None
        self.w: C = None
        self.y: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: B = None
        self.y: E = None
        self.o: H = None
        self.s: C = None
        self.u: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: A = None
        self.o: C = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: G = None
        self.r: A = None
        self.txt = txt

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

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