class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: D = None
        self.o: G = None
        self.v: B = None
        self.t: G = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: A = None
        self.s: B = None
        self.q: F = None
        self.z: E = None
        self.x: A = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: F = None
        self.p: A = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: A = None
        self.s: B = None
        self.q: F = None
        self.z: E = None
        self.x: A = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: F = None
        self.p: A = None
        self.s: F = None
        self.txt = txt

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

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

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

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