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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: I = None
        self.z: F = None
        self.x: G = None
        self.u: H = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: A = None
        self.q: A = None
        self.p: D = None
        self.z: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: E = None
        self.y: B = None
        self.z: J = None
        self.t: J = None
        self.o: J = None
        self.p: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: J = None
        self.w: B = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: E = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: E = None
        self.p: I = None
        self.r: G = None
        self.q: C = None
        self.x: A = None
        self.y: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: I = None
        self.z: F = None
        self.x: G = None
        self.u: H = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: A = None
        self.q: A = None
        self.p: D = None
        self.z: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: E = None
        self.y: B = None
        self.z: J = None
        self.t: J = None
        self.o: J = None
        self.p: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: J = None
        self.w: B = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: E = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: E = None
        self.p: I = None
        self.r: G = None
        self.q: C = None
        self.x: A = None
        self.y: D = None
        self.txt = txt

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

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