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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: D = None
        self.z: F = None
        self.s: H = None
        self.o: F = None
        self.w: C = None
        self.r: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: D = None
        self.z: F = None
        self.s: H = None
        self.o: F = None
        self.w: C = None
        self.r: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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