class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: D = None
        self.q: C = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: F = None
        self.z: B = None
        self.q: E = None
        self.s: H = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: H = None
        self.u: H = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: H = None
        self.z: B = None
        self.o: D = None
        self.x: C = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: E = None
        self.s: F = None
        self.q: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: F = None
        self.z: B = None
        self.q: E = None
        self.s: H = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: H = None
        self.u: H = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: H = None
        self.z: B = None
        self.o: D = None
        self.x: C = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: E = None
        self.s: F = None
        self.q: A = None
        self.txt = txt

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

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

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