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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: I = None
        self.w: C = None
        self.z: B = None
        self.p: I = None
        self.t: I = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: I = None
        self.w: C = None
        self.z: B = None
        self.p: I = None
        self.t: I = None
        self.txt = txt

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

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

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

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

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