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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: A = None
        self.q: D = None
        self.s: B = None
        self.r: C = None
        self.z: A = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: C = None
        self.v: D = None
        self.t: E = None
        self.s: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: A = None
        self.q: D = None
        self.s: B = None
        self.r: C = None
        self.z: A = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: C = None
        self.v: D = None
        self.t: E = None
        self.s: E = None
        self.txt = txt

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

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