class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: C = None
        self.x: B = None
        self.q: B = None
        self.r: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: B = None
        self.p: F = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: B = None
        self.p: F = None
        self.q: F = None
        self.txt = txt

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

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

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

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