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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: H = None
        self.s: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: B = None
        self.t: G = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: C = None
        self.t: H = None
        self.w: F = None
        self.o: E = None
        self.txt = txt

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

d = A("d")
k = B("k")
i = C("i")
n = D("n")
c = E("c")
l = F("l")
a = G("a")
g = H("g")

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: H = None
        self.s: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: B = None
        self.t: G = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: C = None
        self.t: H = None
        self.w: F = None
        self.o: E = None
        self.txt = txt

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

d = A("d")
k = B("k")
i = C("i")
n = D("n")
c = E("c")
l = F("l")
a = G("a")
g = H("g")

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