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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: A = None
        self.p: F = None
        self.z: C = None
        self.w: D = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: B = None
        self.o: G = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: C = None
        self.u: E = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: A = None
        self.r: F = None
        self.u: E = None
        self.s: B = None
        self.y: B = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: A = None
        self.p: F = None
        self.z: C = None
        self.w: D = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: B = None
        self.o: G = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: C = None
        self.u: E = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: A = None
        self.r: F = None
        self.u: E = None
        self.s: B = None
        self.y: B = None
        self.z: E = None
        self.txt = txt

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

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