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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: D = None
        self.q: A = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: D = None
        self.v: B = None
        self.q: F = None
        self.s: B = None
        self.r: E = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: H = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: F = None
        self.v: C = None
        self.y: C = None
        self.o: H = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: D = None
        self.q: A = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: D = None
        self.v: B = None
        self.q: F = None
        self.s: B = None
        self.r: E = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: H = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.w: F = None
        self.v: C = None
        self.y: C = None
        self.o: H = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: B = None
        self.txt = txt

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

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