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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: A = None
        self.q: E = None
        self.x: D = None
        self.r: F = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: A = None
        self.s: C = None
        self.x: D = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: G = None
        self.o: C = None
        self.q: C = None
        self.r: A = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: A = None
        self.q: E = None
        self.x: D = None
        self.r: F = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: A = None
        self.s: C = None
        self.x: D = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: G = None
        self.o: C = None
        self.q: C = None
        self.r: A = None
        self.v: F = None
        self.txt = txt

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

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