class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: D = None
        self.r: J = None
        self.w: D = None
        self.v: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: I = None
        self.w: C = None
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: D = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: B = None
        self.t: G = None
        self.q: G = None
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: G = None
        self.s: C = None
        self.y: J = None
        self.o: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: B = None
        self.v: I = None
        self.o: G = None
        self.w: H = None
        self.t: D = None
        self.s: E = None
        self.y: H = None
        self.z: D = None
        self.u: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: I = None
        self.w: C = None
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: D = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: B = None
        self.t: G = None
        self.q: G = None
        self.v: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: G = None
        self.s: C = None
        self.y: J = None
        self.o: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: B = None
        self.v: I = None
        self.o: G = None
        self.w: H = None
        self.t: D = None
        self.s: E = None
        self.y: H = None
        self.z: D = None
        self.u: I = None
        self.txt = txt

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

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