class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: H = None
        self.z: D = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: I = None
        self.p: A = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: J = None
        self.u: G = None
        self.p: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: C = None
        self.t: C = None
        self.z: D = None
        self.x: J = None
        self.u: C = None
        self.p: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: J = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: I = None
        self.p: B = None
        self.t: G = None
        self.x: I = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: A = None
        self.y: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: I = None
        self.p: A = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: J = None
        self.u: G = None
        self.p: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: C = None
        self.t: C = None
        self.z: D = None
        self.x: J = None
        self.u: C = None
        self.p: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: J = None
        self.q: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: I = None
        self.p: B = None
        self.t: G = None
        self.x: I = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.t: A = None
        self.y: B = None
        self.txt = txt

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

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

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