class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: A = None
        self.x: E = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: D = None
        self.y: B = None
        self.w: A = None
        self.t: G = None
        self.z: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: A = None
        self.x: E = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: D = None
        self.y: B = None
        self.w: A = None
        self.t: G = None
        self.z: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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