class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: D = None
        self.r: B = None
        self.v: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: C = None
        self.txt = txt

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

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

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

j = A("j")
c = B("c")
g = C("g")
i = D("i")
f = E("f")
h = F("h")
k = G("k")
d = D("d")
a = B("a")

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: C = None
        self.txt = txt

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

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

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

j = A("j")
c = B("c")
g = C("g")
i = D("i")
f = E("f")
h = F("h")
k = G("k")
d = D("d")
a = B("a")

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