class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: E = None
        self.s: E = None
        self.p: G = None
        self.u: C = None
        self.x: D = None
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: D = None
        self.t: A = None
        self.p: D = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: G = None
        self.o: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: E = None
        self.s: E = None
        self.p: G = None
        self.u: C = None
        self.x: D = None
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: D = None
        self.t: A = None
        self.p: D = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: G = None
        self.o: G = None
        self.txt = txt

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

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

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