class A:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: G = None
        self.u: G = None
        self.r: H = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: C = None
        self.u: E = None
        self.v: F = None
        self.z: C = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: F = None
        self.v: F = None
        self.x: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: C = None
        self.u: E = None
        self.v: F = None
        self.z: C = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: F = None
        self.v: F = None
        self.x: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: G = None
        self.txt = txt

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

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

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

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