class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: H = None
        self.p: E = None
        self.q: D = None
        self.s: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: A = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: C = None
        self.r: D = None
        self.x: D = None
        self.q: D = None
        self.v: G = None
        self.p: G = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: A = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: C = None
        self.r: D = None
        self.x: D = None
        self.q: D = None
        self.v: G = None
        self.p: G = None
        self.s: C = None
        self.txt = txt

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

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