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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: E = None
        self.q: J = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: F = None
        self.t: F = None
        self.u: E = None
        self.s: D = None
        self.z: A = None
        self.o: B = None
        self.v: F = None
        self.w: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: I = None
        self.w: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: G = None
        self.s: D = None
        self.y: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: E = None
        self.q: J = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: F = None
        self.t: F = None
        self.u: E = None
        self.s: D = None
        self.z: A = None
        self.o: B = None
        self.v: F = None
        self.w: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: I = None
        self.w: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: G = None
        self.s: D = None
        self.y: J = None
        self.txt = txt

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

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

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