class A:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: D = None
        self.p: F = None
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: I = None
        self.q: D = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: I = None
        self.q: D = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

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

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

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

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