class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: F = None
        self.w: E = None
        self.y: F = None
        self.p: E = None
        self.u: D = None
        self.v: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: B = None
        self.x: H = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: D = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: B = None
        self.x: H = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: D = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: G = None
        self.txt = txt

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

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