class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: E = None
        self.s: I = None
        self.w: I = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: I = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: F = None
        self.t: F = None
        self.v: J = None
        self.x: J = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: F = None
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.v: C = None
        self.s: F = None
        self.t: C = None
        self.u: I = None
        self.r: I = None
        self.w: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: I = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: F = None
        self.t: F = None
        self.v: J = None
        self.x: J = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: F = None
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.v: C = None
        self.s: F = None
        self.t: C = None
        self.u: I = None
        self.r: I = None
        self.w: F = None
        self.txt = txt

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

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