class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: I = None
        self.z: H = None
        self.y: H = None
        self.x: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: E = None
        self.r: D = None
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: F = None
        self.q: G = None
        self.v: B = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: B = None
        self.w: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: G = None
        self.u: B = None
        self.v: A = None
        self.w: B = None
        self.p: D = None
        self.y: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: E = None
        self.r: D = None
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: F = None
        self.q: G = None
        self.v: B = None
        self.x: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: B = None
        self.w: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: G = None
        self.u: B = None
        self.v: A = None
        self.w: B = None
        self.p: D = None
        self.y: B = None
        self.txt = txt

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

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

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