class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: F = None
        self.o: G = None
        self.x: D = None
        self.t: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: E = None
        self.r: A = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: E = None
        self.u: E = None
        self.z: C = None
        self.o: B = None
        self.r: C = None
        self.y: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: F = None
        self.o: G = None
        self.x: D = None
        self.t: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: E = None
        self.r: A = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: E = None
        self.u: E = None
        self.z: C = None
        self.o: B = None
        self.r: C = None
        self.y: E = None
        self.txt = txt

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

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