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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: F = None
        self.o: F = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: F = None
        self.o: F = None
        self.z: B = None
        self.txt = txt

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

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

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

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