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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: C = None
        self.w: F = None
        self.t: H = None
        self.o: B = None
        self.u: E = None
        self.p: F = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: E = None
        self.r: E = None
        self.p: C = None
        self.u: C = None
        self.q: A = None
        self.o: D = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: C = None
        self.w: F = None
        self.t: H = None
        self.o: B = None
        self.u: E = None
        self.p: F = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: E = None
        self.r: E = None
        self.p: C = None
        self.u: C = None
        self.q: A = None
        self.o: D = None
        self.x: C = None
        self.txt = txt

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

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