class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: D = None
        self.r: F = None
        self.w: I = None
        self.y: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: H = None
        self.v: H = None
        self.y: A = None
        self.x: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: D = None
        self.z: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: D = None
        self.r: F = None
        self.w: I = None
        self.y: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: H = None
        self.v: H = None
        self.y: A = None
        self.x: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: D = None
        self.z: B = None
        self.txt = txt

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

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

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