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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: F = None
        self.w: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: F = None
        self.s: A = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: E = None
        self.u: G = None
        self.t: A = None
        self.q: B = None
        self.z: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: F = None
        self.w: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: F = None
        self.s: A = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: E = None
        self.u: G = None
        self.t: A = None
        self.q: B = None
        self.z: B = None
        self.txt = txt

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

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

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