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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: A = None
        self.y: H = None
        self.s: F = None
        self.q: F = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: B = None
        self.v: E = None
        self.y: G = None
        self.x: B = None
        self.q: F = None
        self.p: A = None
        self.t: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: A = None
        self.y: H = None
        self.s: F = None
        self.q: F = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: B = None
        self.v: E = None
        self.y: G = None
        self.x: B = None
        self.q: F = None
        self.p: A = None
        self.t: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: F = None
        self.txt = txt

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

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