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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: H = None
        self.s: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: A = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: B = None
        self.u: D = None
        self.r: H = None
        self.z: A = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: H = None
        self.s: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: A = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: B = None
        self.u: D = None
        self.r: H = None
        self.z: A = None
        self.y: H = None
        self.txt = txt

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

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