class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: H = None
        self.w: F = None
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: C = None
        self.u: F = None
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: J = None
        self.r: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: E = None
        self.u: A = None
        self.w: H = None
        self.t: H = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.t: G = None
        self.u: I = None
        self.r: D = None
        self.y: F = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: J = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: F = None
        self.v: D = None
        self.t: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: C = None
        self.u: F = None
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: J = None
        self.r: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: E = None
        self.u: A = None
        self.w: H = None
        self.t: H = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.t: G = None
        self.u: I = None
        self.r: D = None
        self.y: F = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: J = None
        self.w: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: F = None
        self.v: D = None
        self.t: B = None
        self.txt = txt

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

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