class A:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: F = None
        self.o: F = None
        self.v: A = None
        self.u: E = None
        self.x: B = None
        self.t: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: A = None
        self.z: E = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: E = None
        self.w: G = None
        self.q: F = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: E = None
        self.y: G = None
        self.t: D = None
        self.w: D = None
        self.q: D = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: A = None
        self.z: E = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: E = None
        self.w: G = None
        self.q: F = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: E = None
        self.y: G = None
        self.t: D = None
        self.w: D = None
        self.q: D = None
        self.p: E = None
        self.txt = txt

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

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

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