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

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

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: H = None
        self.u: I = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: C = None
        self.x: C = None
        self.u: C = None
        self.q: B = None
        self.t: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: C = None
        self.s: I = None
        self.o: C = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: B = None
        self.v: B = None
        self.s: E = None
        self.z: C = None
        self.r: E = None
        self.o: F = None
        self.p: I = None
        self.q: J = None
        self.txt = txt

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

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

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

h.x = j
h.u = g
h.v = b
h.o = b
h.w = b
h.z = e
h.p = e
h.q = m
b.v = e
b.s = n
b.u = f
b.r = f
b.y = g
b.z = g
b.q = m
b.w = h
b.o = j
b.x = c
c.r = k
m.p = n
m.s = n
m.u = f
m.w = k
e.o = b
e.q = b
e.r = c
e.x = c
e.u = c
e.t = g
j.s = g
k.v = m
k.w = c
k.o = c
k.s = f
k.y = g
n.u = c
n.z = c
n.t = b
n.v = b
n.s = e
n.r = e
n.o = j
n.p = f
n.q = g
f.w = c
f.v = c
f.x = m
f.t = h
f.o = g
f.z = n
f.s = b
f.y = e
f.p = k
g.v = e
g.r = m
g.u = k
g.p = j
assert m.u.y.t.p.s.r.w.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: J = None
        self.v: B = None
        self.z: E = None
        self.p: E = None
        self.o: B = None
        self.w: B = None
        self.q: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: H = None
        self.u: I = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: C = None
        self.x: C = None
        self.u: C = None
        self.q: B = None
        self.t: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: C = None
        self.s: I = None
        self.o: C = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: B = None
        self.v: B = None
        self.s: E = None
        self.z: C = None
        self.r: E = None
        self.o: F = None
        self.p: I = None
        self.q: J = None
        self.txt = txt

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

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

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

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