class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: F = None
        self.w: E = None
        self.x: C = None
        self.p: H = None
        self.s: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: H = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: J = None
        self.x: H = None
        self.s: A = None
        self.p: F = None
        self.u: F = None
        self.w: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: I = None
        self.q: D = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: E = None
        self.t: E = None
        self.o: H = None
        self.u: E = None
        self.z: H = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: C = None
        self.r: E = None
        self.q: J = None
        self.z: F = None
        self.s: B = None
        self.u: H = None
        self.t: F = None
        self.y: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: H = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: J = None
        self.x: H = None
        self.s: A = None
        self.p: F = None
        self.u: F = None
        self.w: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: I = None
        self.q: D = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: E = None
        self.t: E = None
        self.o: H = None
        self.u: E = None
        self.z: H = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: C = None
        self.r: E = None
        self.q: J = None
        self.z: F = None
        self.s: B = None
        self.u: H = None
        self.t: F = None
        self.y: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: A = None
        self.txt = txt

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

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

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