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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: F = None
        self.y: F = None
        self.q: D = None
        self.u: J = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: H = None
        self.o: D = None
        self.r: F = None
        self.u: G = None
        self.z: F = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: D = None
        self.q: A = None
        self.r: F = None
        self.v: H = None
        self.x: D = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: E = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: C = None
        self.q: A = None
        self.s: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: A = None
        self.s: G = None
        self.r: H = None
        self.y: G = None
        self.o: H = None
        self.v: B = None
        self.w: A = None
        self.p: C = None
        self.x: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: F = None
        self.y: F = None
        self.q: D = None
        self.u: J = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: H = None
        self.o: D = None
        self.r: F = None
        self.u: G = None
        self.z: F = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: D = None
        self.q: A = None
        self.r: F = None
        self.v: H = None
        self.x: D = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: E = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: C = None
        self.q: A = None
        self.s: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: A = None
        self.s: G = None
        self.r: H = None
        self.y: G = None
        self.o: H = None
        self.v: B = None
        self.w: A = None
        self.p: C = None
        self.x: B = None
        self.txt = txt

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

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