class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: E = None
        self.v: I = None
        self.x: H = None
        self.t: D = None
        self.q: C = None
        self.y: G = None
        self.s: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: A = None
        self.x: I = None
        self.r: A = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: F = None
        self.u: C = None
        self.x: F = None
        self.p: C = None
        self.o: B = None
        self.txt = txt

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

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

b = A("b")
k = B("k")
l = C("l")
g = D("g")
d = E("d")
i = F("i")
j = G("j")
n = H("n")
m = I("m")
e = J("e")

b.z = k
b.s = k
b.w = d
b.v = m
b.x = n
b.t = g
b.q = l
b.y = j
k.v = j
k.t = g
k.s = n
k.q = n
k.r = n
k.o = l
k.x = d
k.z = m
l.q = k
l.p = m
l.y = d
g.z = n
g.r = n
d.o = n
d.t = b
d.r = b
d.x = m
d.p = k
i.x = k
i.s = l
i.q = l
i.y = e
i.w = e
i.p = e
i.v = g
j.y = d
j.v = m
n.s = m
n.t = i
n.x = i
n.u = l
n.p = l
n.o = k
m.x = k
e.p = n
e.t = g
e.w = g
e.y = g
e.u = m
e.o = m
e.z = k
e.s = i
e.r = l
assert e.r.q.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: E = None
        self.v: I = None
        self.x: H = None
        self.t: D = None
        self.q: C = None
        self.y: G = None
        self.s: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: A = None
        self.x: I = None
        self.r: A = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: F = None
        self.u: C = None
        self.x: F = None
        self.p: C = None
        self.o: B = None
        self.txt = txt

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

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

b = A("b")
k = B("k")
l = C("l")
g = D("g")
d = E("d")
i = F("i")
j = G("j")
n = H("n")
m = I("m")
e = J("e")

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