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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: F = None
        self.q: C = None
        self.w: C = None
        self.z: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: E = None
        self.z: D = None
        self.s: B = None
        self.v: A = None
        self.u: E = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: E = None
        self.t: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: F = None
        self.q: C = None
        self.w: C = None
        self.z: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: E = None
        self.z: D = None
        self.s: B = None
        self.v: A = None
        self.u: E = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: E = None
        self.t: B = None
        self.txt = txt

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

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