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

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: B = None
        self.v: F = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: F = None
        self.y: D = None
        self.s: F = None
        self.o: E = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: B = None
        self.v: F = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: F = None
        self.y: D = None
        self.s: F = None
        self.o: E = None
        self.w: D = None
        self.txt = txt

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

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

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

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