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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: E = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: G = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: A = None
        self.z: E = None
        self.u: D = None
        self.y: D = None
        self.o: G = None
        self.w: D = None
        self.s: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: E = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: G = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: A = None
        self.z: E = None
        self.u: D = None
        self.y: D = None
        self.o: G = None
        self.w: D = None
        self.s: C = None
        self.txt = txt

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

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