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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: H = None
        self.t: F = None
        self.s: A = None
        self.y: B = None
        self.o: H = None
        self.u: G = None
        self.z: I = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: B = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: A = None
        self.t: B = None
        self.r: C = None
        self.u: G = None
        self.w: C = None
        self.o: A = None
        self.q: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: H = None
        self.t: F = None
        self.s: A = None
        self.y: B = None
        self.o: H = None
        self.u: G = None
        self.z: I = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: B = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: A = None
        self.t: B = None
        self.r: C = None
        self.u: G = None
        self.w: C = None
        self.o: A = None
        self.q: D = None
        self.txt = txt

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

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