class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: F = None
        self.s: G = None
        self.r: G = None
        self.x: H = None
        self.p: C = None
        self.w: G = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: E = None
        self.x: D = None
        self.v: A = None
        self.q: B = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: F = None
        self.s: E = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: A = None
        self.x: F = None
        self.v: A = None
        self.r: E = None
        self.s: C = None
        self.o: B = None
        self.y: C = None
        self.txt = txt

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

d = A("d")
b = B("b")
k = C("k")
e = D("e")
i = E("i")
n = F("n")
c = G("c")
m = H("m")
f = B("f")

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: E = None
        self.x: D = None
        self.v: A = None
        self.q: B = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: F = None
        self.s: E = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: A = None
        self.x: F = None
        self.v: A = None
        self.r: E = None
        self.s: C = None
        self.o: B = None
        self.y: C = None
        self.txt = txt

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

d = A("d")
b = B("b")
k = C("k")
e = D("e")
i = E("i")
n = F("n")
c = G("c")
m = H("m")
f = B("f")

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