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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: A = None
        self.x: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: B = None
        self.t: E = None
        self.x: D = None
        self.u: D = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: C = None
        self.p: B = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: D = None
        self.u: D = None
        self.y: H = None
        self.p: J = None
        self.v: D = None
        self.q: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: C = None
        self.x: E = None
        self.q: B = None
        self.r: B = None
        self.o: D = None
        self.s: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: A = None
        self.x: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: B = None
        self.t: E = None
        self.x: D = None
        self.u: D = None
        self.o: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: C = None
        self.p: B = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: D = None
        self.u: D = None
        self.y: H = None
        self.p: J = None
        self.v: D = None
        self.q: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: C = None
        self.x: E = None
        self.q: B = None
        self.r: B = None
        self.o: D = None
        self.s: D = None
        self.txt = txt

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

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