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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: E = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: C = None
        self.w: H = None
        self.o: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: E = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: C = None
        self.w: H = None
        self.o: A = None
        self.txt = txt

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

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

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