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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: H = None
        self.v: C = None
        self.y: J = None
        self.o: D = None
        self.u: A = None
        self.x: C = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: H = None
        self.p: G = None
        self.z: E = None
        self.v: A = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: H = None
        self.r: A = None
        self.x: B = None
        self.u: A = None
        self.o: C = None
        self.w: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: A = None
        self.v: J = None
        self.q: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: A = None
        self.p: B = None
        self.q: B = None
        self.z: A = None
        self.s: B = None
        self.v: A = None
        self.t: D = None
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: H = None
        self.v: C = None
        self.y: J = None
        self.o: D = None
        self.u: A = None
        self.x: C = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: H = None
        self.p: G = None
        self.z: E = None
        self.v: A = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: H = None
        self.r: A = None
        self.x: B = None
        self.u: A = None
        self.o: C = None
        self.w: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: A = None
        self.v: J = None
        self.q: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: A = None
        self.p: B = None
        self.q: B = None
        self.z: A = None
        self.s: B = None
        self.v: A = None
        self.t: D = None
        self.u: A = None
        self.txt = txt

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

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