class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: C = None
        self.z: B = None
        self.q: C = None
        self.u: D = None
        self.x: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: A = None
        self.r: G = None
        self.u: A = None
        self.t: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: F = None
        self.z: E = None
        self.w: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: A = None
        self.r: G = None
        self.u: A = None
        self.t: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: F = None
        self.z: E = None
        self.w: F = None
        self.txt = txt

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

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