class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: I = None
        self.q: C = None
        self.z: I = None
        self.w: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: A = None
        self.s: C = None
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: H = None
        self.r: G = None
        self.z: H = None
        self.u: C = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: F = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.u: G = None
        self.p: G = None
        self.v: F = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: A = None
        self.s: C = None
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: H = None
        self.r: G = None
        self.z: H = None
        self.u: C = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: F = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.u: G = None
        self.p: G = None
        self.v: F = None
        self.y: H = None
        self.txt = txt

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

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

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