class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: F = None
        self.w: G = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: C = None
        self.p: C = None
        self.q: A = None
        self.u: B = None
        self.v: A = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: B = None
        self.v: G = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: C = None
        self.p: C = None
        self.q: A = None
        self.u: B = None
        self.v: A = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: B = None
        self.v: G = None
        self.p: B = None
        self.txt = txt

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

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