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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: H = None
        self.x: G = None
        self.o: A = None
        self.v: G = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: B = None
        self.q: F = None
        self.y: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: D = None
        self.z: J = None
        self.x: D = None
        self.p: J = None
        self.s: H = None
        self.w: I = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.z: I = None
        self.x: B = None
        self.v: F = None
        self.w: I = None
        self.p: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: A = None
        self.y: A = None
        self.txt = txt

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

f.u = i
f.s = i
f.p = i
f.r = i
f.z = j
f.y = j
f.q = a
f.x = c
f.t = c
f.w = c
j.q = c
j.r = m
j.w = m
j.x = n
j.v = n
j.o = f
l.p = i
l.y = i
l.o = j
l.q = b
k.s = j
k.z = j
k.p = n
k.q = f
k.u = f
k.x = c
k.r = l
k.w = l
k.o = m
i.o = m
b.t = c
n.q = j
n.u = k
n.x = k
n.z = a
n.p = a
n.s = m
n.w = c
n.r = f
m.y = a
m.z = c
m.w = c
m.x = j
m.p = j
m.v = b
c.w = l
a.x = b
a.w = f
a.y = f
assert f.s.o.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: B = None
        self.q: J = None
        self.x: I = None
        self.y: B = None
        self.s: E = None
        self.t: I = None
        self.w: I = None
        self.p: E = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: H = None
        self.x: G = None
        self.o: A = None
        self.v: G = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: B = None
        self.q: F = None
        self.y: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: D = None
        self.z: J = None
        self.x: D = None
        self.p: J = None
        self.s: H = None
        self.w: I = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.z: I = None
        self.x: B = None
        self.v: F = None
        self.w: I = None
        self.p: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: A = None
        self.y: A = None
        self.txt = txt

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

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