class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: G = None
        self.u: H = None
        self.w: B = None
        self.q: I = None
        self.x: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: C = None
        self.r: D = None
        self.z: A = None
        self.u: H = None
        self.v: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: A = None
        self.v: H = None
        self.y: H = None
        self.r: B = None
        self.w: A = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: H = None
        self.x: H = None
        self.z: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

j = A("j")
c = B("c")
b = C("b")
g = D("g")
d = E("d")
f = F("f")
e = G("e")
n = H("n")
i = I("i")

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: C = None
        self.r: D = None
        self.z: A = None
        self.u: H = None
        self.v: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: A = None
        self.v: H = None
        self.y: H = None
        self.r: B = None
        self.w: A = None
        self.t: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: H = None
        self.x: H = None
        self.z: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

j = A("j")
c = B("c")
b = C("b")
g = D("g")
d = E("d")
f = F("f")
e = G("e")
n = H("n")
i = I("i")

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