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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: E = None
        self.r: G = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: H = None
        self.o: G = None
        self.t: B = None
        self.v: A = None
        self.q: E = None
        self.s: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: C = None
        self.o: H = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: E = None
        self.r: G = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: H = None
        self.o: G = None
        self.t: B = None
        self.v: A = None
        self.q: E = None
        self.s: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: C = None
        self.o: H = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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