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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: B = None
        self.txt = txt

e = A("e")
d = B("d")
g = C("g")
k = D("k")
j = E("j")
a = F("a")
c = G("c")
m = B("m")

e.v = c
e.s = c
d.o = j
g.v = k
k.s = c
k.v = c
k.r = e
j.v = g
j.u = m
a.z = k
a.o = k
a.r = k
a.v = c
a.t = c
a.p = g
a.x = g
c.z = m
c.o = d
m.o = j
assert a.o.v.z.o.txt == "
class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: B = None
        self.txt = txt

e = A("e")
d = B("d")
g = C("g")
k = D("k")
j = E("j")
a = F("a")
c = G("c")
m = B("m")

e.v = c
e.s = c
d.o = j
g.v = k
k.s = c
k.v = c
k.r = e
j.v = g
j.u = m
a.z = k
a.o = k
a.r = k
a.v = c
a.t = c
a.p = g
a.x = g
c.z = m
c.o = d
m.o = j
assert a.o.v.z.o.txt == "j"