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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: G = None
        self.t: H = None
        self.w: E = None
        self.s: A = None
        self.z: G = None
        self.v: G = None
        self.q: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: I = None
        self.y: A = None
        self.w: F = None
        self.o: A = None
        self.txt = txt

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

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

a = A("a")
c = B("c")
k = C("k")
f = D("f")
i = E("i")
d = F("d")
g = G("g")
m = H("m")
j = I("j")

a.t = f
a.r = f
a.z = m
a.q = g
a.x = d
a.o = d
a.p = j
a.y = c
a.s = k
c.r = j
c.w = j
c.v = a
c.u = a
c.o = i
c.s = k
k.o = m
k.t = m
k.y = g
k.z = g
k.v = g
k.q = g
k.w = i
k.s = a
f.q = c
f.s = a
f.z = a
f.w = i
i.o = c
i.u = j
i.z = j
i.w = j
i.x = j
i.t = j
i.q = k
d.r = m
d.s = m
d.x = c
g.p = m
g.t = j
g.y = a
g.o = a
g.w = d
m.t = a
m.z = j
m.s = k
m.o = i
j.w = i
j.o = c
assert m.t.q.y.q.w.r.z.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: H = None
        self.q: G = None
        self.x: F = None
        self.o: F = None
        self.r: D = None
        self.p: I = None
        self.y: B = None
        self.s: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: G = None
        self.t: H = None
        self.w: E = None
        self.s: A = None
        self.z: G = None
        self.v: G = None
        self.q: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: I = None
        self.y: A = None
        self.w: F = None
        self.o: A = None
        self.txt = txt

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

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

a = A("a")
c = B("c")
k = C("k")
f = D("f")
i = E("i")
d = F("d")
g = G("g")
m = H("m")
j = I("j")

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