class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: C = None
        self.p: E = None
        self.y: G = None
        self.o: H = None
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: E = None
        self.w: D = None
        self.t: C = None
        self.x: E = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: B = None
        self.z: E = None
        self.y: H = None
        self.o: D = None
        self.s: G = None
        self.q: E = None
        self.w: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: G = None
        self.q: G = None
        self.z: D = None
        self.txt = txt

f = A("f")
k = B("k")
m = C("m")
n = D("n")
a = E("a")
i = F("i")
b = G("b")
h = H("h")
g = B("g")
j = G("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: C = None
        self.p: E = None
        self.y: G = None
        self.o: H = None
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: E = None
        self.w: D = None
        self.t: C = None
        self.x: E = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: B = None
        self.z: E = None
        self.y: H = None
        self.o: D = None
        self.s: G = None
        self.q: E = None
        self.w: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: G = None
        self.q: G = None
        self.z: D = None
        self.txt = txt

f = A("f")
k = B("k")
m = C("m")
n = D("n")
a = E("a")
i = F("i")
b = G("b")
h = H("h")
g = B("g")
j = G("j")

f.q = a
f.x = g
k.w = g
k.s = g
k.o = n
k.r = f
m.o = a
m.t = b
m.s = k
n.t = h
n.o = h
n.w = m
n.p = a
n.y = j
n.q = b
a.t = k
i.z = m
i.t = m
i.q = a
i.x = a
i.w = n
i.u = f
b.p = h
b.y = h
b.u = g
b.z = a
b.q = a
b.o = n
b.s = j
b.w = j
h.w = a
h.o = j
h.q = j
h.z = n
g.w = k
g.s = k
g.o = n
g.r = f
j.p = h
j.y = h
j.u = k
j.z = a
j.q = a
j.o = n
j.s = b
j.w = b
assert a.t.r.q.t.w.w.txt == "k"