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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: A = None
        self.q: J = None
        self.s: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: J = None
        self.x: H = None
        self.q: G = None
        self.y: A = None
        self.o: C = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: H = None
        self.z: H = None
        self.r: C = None
        self.w: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: D = None
        self.s: E = None
        self.x: G = None
        self.v: A = None
        self.p: D = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: E = None
        self.v: E = None
        self.t: G = None
        self.s: A = None
        self.p: C = None
        self.y: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: A = None
        self.q: J = None
        self.s: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: J = None
        self.x: H = None
        self.q: G = None
        self.y: A = None
        self.o: C = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: H = None
        self.z: H = None
        self.r: C = None
        self.w: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: D = None
        self.s: E = None
        self.x: G = None
        self.v: A = None
        self.p: D = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: E = None
        self.v: E = None
        self.t: G = None
        self.s: A = None
        self.p: C = None
        self.y: E = None
        self.txt = txt

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

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

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