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

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: C = None
        self.x: H = None
        self.p: I = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: J = None
        self.q: D = None
        self.s: A = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: H = None
        self.s: J = None
        self.v: B = None
        self.o: H = None
        self.x: A = None
        self.z: B = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: G = None
        self.w: I = None
        self.s: C = None
        self.t: F = None
        self.p: J = None
        self.v: G = None
        self.q: G = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: C = None
        self.x: H = None
        self.p: I = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: J = None
        self.q: D = None
        self.s: A = None
        self.v: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: H = None
        self.s: J = None
        self.v: B = None
        self.o: H = None
        self.x: A = None
        self.z: B = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: G = None
        self.w: I = None
        self.s: C = None
        self.t: F = None
        self.p: J = None
        self.v: G = None
        self.q: G = None
        self.txt = txt

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

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

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

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