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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: H = None
        self.q: F = None
        self.t: G = None
        self.y: C = None
        self.s: I = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: B = None
        self.w: A = None
        self.z: B = None
        self.q: F = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: H = None
        self.q: F = None
        self.t: G = None
        self.y: C = None
        self.s: I = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: B = None
        self.w: A = None
        self.z: B = None
        self.q: F = None
        self.y: H = None
        self.txt = txt

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

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