class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: C = None
        self.u: I = None
        self.p: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: H = None
        self.w: I = None
        self.x: H = None
        self.z: D = None
        self.s: H = None
        self.u: H = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: E = None
        self.x: G = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: G = None
        self.s: C = None
        self.w: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.p: G = None
        self.r: B = None
        self.o: J = None
        self.x: G = None
        self.y: A = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: D = None
        self.x: B = None
        self.t: A = None
        self.r: G = None
        self.o: D = None
        self.y: E = None
        self.txt = txt

f = A("f")
m = B("m")
d = C("d")
l = D("l")
k = E("k")
g = F("g")
n = G("n")
a = H("a")
j = I("j")
h = J("h")

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: H = None
        self.w: I = None
        self.x: H = None
        self.z: D = None
        self.s: H = None
        self.u: H = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: E = None
        self.x: G = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: G = None
        self.s: C = None
        self.w: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.p: G = None
        self.r: B = None
        self.o: J = None
        self.x: G = None
        self.y: A = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: D = None
        self.x: B = None
        self.t: A = None
        self.r: G = None
        self.o: D = None
        self.y: E = None
        self.txt = txt

f = A("f")
m = B("m")
d = C("d")
l = D("l")
k = E("k")
g = F("g")
n = G("n")
a = H("a")
j = I("j")
h = J("h")

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