class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: D = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: F = None
        self.s: E = None
        self.q: A = None
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: D = None
        self.z: C = None
        self.q: E = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: B = None
        self.u: F = None
        self.o: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

k = A("k")
h = B("h")
f = C("f")
d = D("d")
a = E("a")
j = F("j")
e = G("e")
n = H("n")
l = D("l")
g = C("g")

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: F = None
        self.s: E = None
        self.q: A = None
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: D = None
        self.z: C = None
        self.q: E = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: B = None
        self.u: F = None
        self.o: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

k = A("k")
h = B("h")
f = C("f")
d = D("d")
a = E("a")
j = F("j")
e = G("e")
n = H("n")
l = D("l")
g = C("g")

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