class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: H = None
        self.w: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: J = None
        self.x: I = None
        self.s: B = None
        self.v: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: E = None
        self.x: D = None
        self.r: D = None
        self.t: I = None
        self.w: J = None
        self.q: B = None
        self.o: J = None
        self.z: A = None
        self.y: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: B = None
        self.q: H = None
        self.x: A = None
        self.w: A = None
        self.r: J = None
        self.t: J = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: J = None
        self.x: I = None
        self.s: B = None
        self.v: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: E = None
        self.x: D = None
        self.r: D = None
        self.t: I = None
        self.w: J = None
        self.q: B = None
        self.o: J = None
        self.z: A = None
        self.y: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: B = None
        self.q: H = None
        self.x: A = None
        self.w: A = None
        self.r: J = None
        self.t: J = None
        self.txt = txt

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

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

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