class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: A = None
        self.w: D = None
        self.x: E = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: A = None
        self.w: D = None
        self.x: E = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

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