class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: F = None
        self.x: E = None
        self.u: D = None
        self.q: G = None
        self.o: H = None
        self.y: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: A = None
        self.q: C = None
        self.v: H = None
        self.u: C = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: G = None
        self.x: E = None
        self.y: H = None
        self.p: D = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: F = None
        self.x: E = None
        self.u: D = None
        self.q: G = None
        self.o: H = None
        self.y: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: A = None
        self.q: C = None
        self.v: H = None
        self.u: C = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: G = None
        self.x: E = None
        self.y: H = None
        self.p: D = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: C = None
        self.txt = txt

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

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

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