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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: A = None
        self.x: B = None
        self.o: C = None
        self.u: G = None
        self.txt = txt

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

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

a = A("a")
g = B("g")
e = C("e")
j = D("j")
k = E("k")
f = F("f")
b = G("b")
h = G("h")
m = E("m")

a.v = e
a.s = e
a.y = g
g.t = f
g.r = f
g.o = e
g.x = h
g.s = a
g.v = m
e.z = a
e.o = m
j.v = e
k.w = m
k.t = a
k.x = g
k.o = e
k.u = h
f.x = k
b.o = e
h.o = e
m.w = k
m.t = a
m.x = g
m.o = e
m.u = h
assert h.o.z.v.z.s.z.y.s.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: C = None
        self.y: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: A = None
        self.x: B = None
        self.o: C = None
        self.u: G = None
        self.txt = txt

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

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

a = A("a")
g = B("g")
e = C("e")
j = D("j")
k = E("k")
f = F("f")
b = G("b")
h = G("h")
m = E("m")

a.v = e
a.s = e
a.y = g
g.t = f
g.r = f
g.o = e
g.x = h
g.s = a
g.v = m
e.z = a
e.o = m
j.v = e
k.w = m
k.t = a
k.x = g
k.o = e
k.u = h
f.x = k
b.o = e
h.o = e
m.w = k
m.t = a
m.x = g
m.o = e
m.u = h
assert h.o.z.v.z.s.z.y.s.txt == "a"