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

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: H = None
        self.p: D = None
        self.s: D = None
        self.w: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: A = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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

i.x = d
i.s = l
i.q = f
i.y = f
i.w = f
i.r = a
i.p = h
i.v = c
h.z = m
h.q = m
h.s = m
h.r = i
h.v = j
h.x = e
l.x = j
l.t = c
l.p = f
l.s = f
l.w = m
f.u = i
f.x = c
a.v = i
m.u = a
m.z = j
m.s = d
m.q = d
m.v = e
m.w = h
m.y = h
m.t = l
d.p = f
d.x = e
c.r = m
c.s = i
c.p = h
j.u = c
e.x = c
e.y = h
e.q = h
e.r = m
e.w = a
e.v = i
e.u = d
e.z = j
assert a.v.p.x.v.txt == "
class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: C = None
        self.q: D = None
        self.r: E = None
        self.y: D = None
        self.p: B = None
        self.w: D = None
        self.v: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: H = None
        self.p: D = None
        self.s: D = None
        self.w: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: A = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

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

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