class A:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: E = None
        self.v: B = None
        self.t: C = None
        self.w: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: H = None
        self.x: A = None
        self.u: A = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: A = None
        self.s: J = None
        self.r: H = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: E = None
        self.q: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: B = None
        self.z: A = None
        self.txt = txt

f = A("f")
c = B("c")
h = C("h")
m = D("m")
i = E("i")
l = F("l")
j = G("j")
k = H("k")
n = I("n")
d = J("d")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: H = None
        self.x: A = None
        self.u: A = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: A = None
        self.s: J = None
        self.r: H = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: E = None
        self.q: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: B = None
        self.z: A = None
        self.txt = txt

f = A("f")
c = B("c")
h = C("h")
m = D("m")
i = E("i")
l = F("l")
j = G("j")
k = H("k")
n = I("n")
d = J("d")

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