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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: I = None
        self.x: A = None
        self.u: E = None
        self.q: B = None
        self.y: I = None
        self.z: H = None
        self.p: D = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: J = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: D = None
        self.s: C = None
        self.z: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: F = None
        self.p: G = None
        self.u: E = None
        self.q: F = None
        self.s: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.s: C = None
        self.t: B = None
        self.r: H = None
        self.txt = txt

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

m.o = i
m.x = h
m.v = f
m.z = e
m.r = j
m.p = j
m.q = b
h.v = b
h.t = m
h.r = m
h.z = j
h.s = e
h.y = i
h.o = i
h.p = k
h.x = k
f.w = m
f.x = m
f.t = m
f.s = l
f.y = l
f.u = j
f.q = h
f.z = b
f.p = k
k.s = f
k.z = f
k.x = c
k.q = j
k.t = j
k.v = i
k.u = i
k.y = b
k.o = b
k.r = e
j.r = l
j.p = c
j.u = m
i.u = f
i.q = f
e.u = k
e.v = k
e.s = f
e.z = h
b.w = k
b.q = e
l.t = m
l.y = i
l.q = i
l.p = e
l.u = j
l.s = k
c.p = h
c.x = h
c.t = h
c.s = f
c.r = b
assert f.z.w.z.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: B = None
        self.v: C = None
        self.z: G = None
        self.r: E = None
        self.p: E = None
        self.q: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: I = None
        self.x: A = None
        self.u: E = None
        self.q: B = None
        self.y: I = None
        self.z: H = None
        self.p: D = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: J = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: D = None
        self.s: C = None
        self.z: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: F = None
        self.p: G = None
        self.u: E = None
        self.q: F = None
        self.s: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: B = None
        self.s: C = None
        self.t: B = None
        self.r: H = None
        self.txt = txt

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

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