class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: C = None
        self.r: C = None
        self.s: G = None
        self.x: D = None
        self.u: E = None
        self.p: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: E = None
        self.t: F = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: E = None
        self.t: F = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

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