class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: E = None
        self.r: C = None
        self.u: C = None
        self.z: D = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: D = None
        self.z: D = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: G = None
        self.p: F = None
        self.x: G = None
        self.w: A = None
        self.t: J = None
        self.r: J = None
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: B = None
        self.v: C = None
        self.x: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: A = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: D = None
        self.z: D = None
        self.y: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: G = None
        self.p: F = None
        self.x: G = None
        self.w: A = None
        self.t: J = None
        self.r: J = None
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: B = None
        self.v: C = None
        self.x: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: A = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

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

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