class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: G = None
        self.y: C = None
        self.p: B = None
        self.r: E = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: B = None
        self.o: H = None
        self.v: A = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: G = None
        self.v: B = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: B = None
        self.o: H = None
        self.v: A = None
        self.q: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: G = None
        self.v: B = None
        self.u: B = None
        self.txt = txt

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

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

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