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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: F = None
        self.t: J = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: I = None
        self.y: H = None
        self.u: D = None
        self.s: C = None
        self.v: I = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: I = None
        self.r: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: F = None
        self.q: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: F = None
        self.t: J = None
        self.w: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: I = None
        self.y: H = None
        self.u: D = None
        self.s: C = None
        self.v: I = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: I = None
        self.r: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: F = None
        self.q: D = None
        self.txt = txt

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

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