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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: H = None
        self.x: G = None
        self.p: B = None
        self.t: B = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.u: D = None
        self.s: E = None
        self.v: H = None
        self.r: A = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: E = None
        self.q: G = None
        self.v: F = None
        self.p: E = None
        self.x: G = None
        self.s: G = None
        self.w: I = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: A = None
        self.u: F = None
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: H = None
        self.x: G = None
        self.p: B = None
        self.t: B = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.u: D = None
        self.s: E = None
        self.v: H = None
        self.r: A = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: E = None
        self.q: G = None
        self.v: F = None
        self.p: E = None
        self.x: G = None
        self.s: G = None
        self.w: I = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: A = None
        self.u: F = None
        self.r: B = None
        self.txt = txt

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

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