class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: F = None
        self.r: F = None
        self.x: I = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: H = None
        self.w: G = None
        self.u: E = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: A = None
        self.q: I = None
        self.o: C = None
        self.t: J = None
        self.v: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: E = None
        self.s: H = None
        self.u: J = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: D = None
        self.x: H = None
        self.v: F = None
        self.w: I = None
        self.z: E = None
        self.t: C = None
        self.r: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: H = None
        self.w: G = None
        self.u: E = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: A = None
        self.q: I = None
        self.o: C = None
        self.t: J = None
        self.v: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: E = None
        self.s: H = None
        self.u: J = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: D = None
        self.x: H = None
        self.v: F = None
        self.w: I = None
        self.z: E = None
        self.t: C = None
        self.r: I = None
        self.txt = txt

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

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