class A:
    def __init__(self, txt: str):
        self.x: J = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: F = None
        self.w: B = None
        self.q: A = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: I = None
        self.t: I = None
        self.q: I = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: F = None
        self.w: B = None
        self.q: A = None
        self.z: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: I = None
        self.t: I = None
        self.q: I = None
        self.v: A = None
        self.txt = txt

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

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